Introduction to Programming

Back to Tutorials


Lesson 3: Programming Languages

As discussed in Lesson 1, we write programs in Programming Languages. You may have heard of some of them, eg 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:

  yourname : string[30];

  writeln('Please enter your name:');
  writeln('Hi', yourname, ' my name is James.');

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 and C++ languages in greater detail in the next Tutorials.


Back to Tutorials


Copyright 1997, John Crickett & Neil Henderson.
Legal Information