Algorithm for addition 2 numbers (Version 1, Version 2, Version 3)
Following is algorithm for addition of 2 integers using single scanf().
Step 1: Start
Step 2: Declare variables a,b & c.
Step 3: Read values a & b.
Step 4: Add a and b and assign the result to c. c=a+b
Step 5: Display c
Step 6: Stop
Following is algorithm for addition of 2 integers using multiple scanf().
1) Start.
2) Accept first number.
3) Accept second number.
4) Add both numbers.
5) Print the result.
6) End
Following is algorithm for addition of 2 integers.
- Start
- Read the Value of A and B.
- SUM = A+B.
- Display SUM.
- Stop
Comments
Post a Comment