Xpode.com        Click here to Print this article.

Basic Concepts - Algorithm

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.


Contributed by:
Ritika Sood
Lecturer in computer science....Love to do programming...Other interests are sports, freaking out with frnds, travel at beautiful places, watch movies, listen songs....

Resourse address on xpode.com

Click here to go on website