|
An Introduction To Programming:
Lessons:
[ 1 ]
[ 2 ]
[ 3 ]
Lesson Requirements
Nothing.
Lesson Summary
The third Lesson in this Introduction to Programming Tutorial details some common programming languages..
As discussed in Lesson 1, we write programs in Programming Languages. You may have heard of some of them, e.g. BASIC, Pascal, and C. Each programming language has it's own set of instructions. Some languages are very similar, for example there are many
languages based upon C.
Here is some code from a BASIC program:
let myname$ = "James"
print "What is your name?"
input yourname$
print "Hello, ";yourname$;" it's nice to meet you."
print "My name is ";myname$
Here is some code from a Pascal program:
var
yourname : string[30];
begin
writeln('Please enter your name:');
readln(yourname);
writeln;
writeln('Hi', yourname, ' my name is James.');
end.
And here is some code from a C program:
{
char yourname[30];
printf("Please enter
your name: ");
scanf("%s", yourname);
}
Don't worry about all these strange words. The important thing to note is that different programming languages have different instructions. We will be looking at the C language in greater detail in the next Tutorials.
|