Topic Content:
- Meaning of Computer Program
- Example of a Basic Computer Program
What is a Computer Program?
A computer program is a set of instructions, written in any of the computer languages, and which the computer follows, orderly, to perform any given task.
A computer program tells the computer what to do, how to do it, when to do it, etc.
For example, the program below tells the computer to add, three and four, and print out the answer.
10 A = 3.
15 B = 4.
20 C = A + B.
25 D = Print C.
30 End.
The numbers 10, 15, to 30, are called line numbers. The computer performs line 10 before line 15 and line 15 before line 20. On line 20, it will add three and four and on line 25, it will print the result.
Responses