September 24, 2022

Algorithm to Add [Sum] two numbers

In this tutorial, we are going to write an algorithm to Add or Sum of two numbers. using this algorithm we can write a program to Add [Sum] two numbers in most programming languages like C, C++, Java and Python.

Algorithm to Add [Sum] two numbers

Algorithm to Add [Sum] of two numbers.

1. Read A and B.
2. Set SUM := A + B.
3. Write SUM.
4. Exit.

Here in the above algorithm we first read two integer inputs A and B. Then we set the value of the A and B variables into the SUM variable. and then write the SUM variable value on the output screen and exit from the program.

Leave a Reply

Your email address will not be published. Required fields are marked *