What is program?
Program is a collection of instructions. Instruction specifies an operation such as add, subtract, multiply, store and so on. Computer works by executing the programs stored in its memory. One who writes programs is called programmer. The first programmer in the world is Lady Ada. Collection of programs is called software.
Program should be written in a programming language. Before writing a program, it is better to write a pseudo code as given below.
Input Number1, Number2
Add Number1 and Number2
Pseudo code is one that explains the logic in a simple unambiguous manner. Programmer can write this in his own way. The code says that two numbers (as input) symbolically represented as Number1 and Number2 respectively to be fed into the system, add the given two numbers and print the sum in an output device, say console (or monitor).
Now it is possible to write a simple program that adds two numbers is written can be written in a programming language, say, BASIC programming language.
10 READ Number1, Number2
20 SUM = Number1 + Number2
30 PRINT SUM
Now the computer should be asked to execute the program. This can be done by command, for example, Run. Once the program is executed the data should be fed and the result, that is, sum will be displayed in the monitor. For example, if the two numbers are given as input are 10 and 20 then the sum 30 will appear on the screen.