Turbo C assignment # 1
|
(Re-Written in visual C# 2010 for producing here)
|
.
|
A
few decades ago when I was learning computer programing in some institute in
Karachi, Sindh, Pakistan, during orientation class a teacher, who after-wards taught us 'dBASE III plus' and was very good teacher, praised 'C' computer
programing language a lot. And that created special kind of curiosity in me for
'C' programing language. And a line he spoke about benefits of learning 'C'
computer programing language is still very valid in 2017.
|
And when in 2nd
semester we started learning 'C' programing language, I was going ahead of
class work, at least I was thinking so. I was reading my 'C' book faster then class lecture was going. I was
going to library and reading different books on 'C' programing language. I was
going to computer lab and writing sample and example programs from books looking
interesting to me and experimenting with those programs and was also solving
exercises from different books.
|
In that class I/we learned 'C'
programing language through 'Turbo C Ver 2'. 'Turbo C's IDE was very excellent and advance. During that time before and beside 'Turbo C' I liked 'GW-Basic' for its own
good IDE and 'dBASE III plus' for it's very good IDE.
|
As I am writing this text, time then spent in that institute is coming to my
mind. Friends of that time/institute, teachers and specially that of 'C' subject,
class room, computer labs and specially 'C' lab, library etc. Every thing is
revisiting my mind in pieces in random sequence. And a gentle wish of some-how
going back in time to that time and place is also coming in my mind. But
because it can not happen so I am getting a strange feeling of loosing something.
|
From that time a program written in 'Turbo C' is still available with me in
hard copy. Special thing about that program is that it was first assignment of
'Turbo C', my favorite subject/class of 2nd semester, and so still is very
memorable for me. One more thing special about it is that, on assignment
submitting day in 'C Lab' after loading 'C' assignment in 'Turbo C' IDE, I was
waiting for 'C' teacher to come up to me to inspect/check my assignment. I was sitting in front of PC with my back towards PC. On my
turn teacher came to me and while looking on monitor of PC I was using said to
me with his ever smiling face and eyes "Oh, you did nothing". I got shocked and
looked back at computer screen ... Computer monitor was blank ... "What
happened? where is everything? ..." I said to myself. Meanwhile teacher
touched some key on keyboard and everything came back, monitor become alive
again. I felt relieved/relaxed. Teacher looked at code. Then ran it by pressing
'Ctrl+F9'. Then looked at it's out-put. Again looked at code. Ran code few more
times. Praised me for my assignment, but not before disturbing my heart beat, and
went to next student sitting in front of next PC beside me, Amir Hanif, who was very good friend of mine. Meanwhile my heart beat started to come back to normal.
|
.
|
Turbo C assignment requirement |
Requirement for 'Turbo C' assignment #1 was to display all tables from '2' to '10' together on
computer monitor with proper formatting.
|
.
|
Assignment Code migration from Turbo C to C# 2010 |
'Turbo C' is
available on my Pentium 3 and that Pentium 3 is not booting, in fact it is not
getting ON, and I am neither fixing it myself nor taking it to shop for fixing
it. So I can not write that assignment in 'Turbo C'. So I wrote it in visual c#
2010 as a console application for producing here on my this Blog.
|
Following is the C#
code for achieving above discussed 'Turbo C' assignment requirements in 'C# 2010'
Console application. I made a few +/- to
original code for adjusting to C# console application. Code is well documented
and easy to understand.
|
.
|
|
.
|
Visual C# 2010 Code |
|
.
|
|
.
|
Application Output |
(Console screen/window after program execution) |
|
.
|
If there are any mistakes then I will surely remove them whenever
found.
|
I used 'Snipping Tool' for getting Screen-shot of application discussed above. And I did this for the first time for this post. Doing this helped me keeping background color of post.
|
|
Enjoy
Complete
Source code of application written and compiled in visual studio 2010 Ultimate by me.
Download it. Extract it. Read 'ReadMeFirst.txt' file and do as is explained in
it.
|
|