An algorithm is a sequence of instructions or steps. These instructions are written in such a way that if they are executed in the specified sequence then user will get the required results.
Algorithm to add two numbers is given below:
In this algorithm we will add two numbers A and B and will store the result in C.
Step 1- Input A.
Step 2- Input B.
Step 3- Set C: = A+ B.
Step 4- Write: ‘Sum of’, A,’ and ‘, B, ‘is ‘, C.
Step 5- Exit.