* Write a Program and Algorithm to find the Sum of two Number by using C++ Language.
Algorithm :
- Start
- Read the value of num1 ,num2 and Sum.
- Enter the value of num1.
- Enter the value of num2.
- Calculation, Sum=num1+num2;
- Print the value of addition of two number "Sum".
- Stop.
Program :
#include<iostream.h>
#include<conio.h>
int main()
{
int num1,num2,Sum;
clrscr();
cout<< "Enter the value of number 1 and number 2";
cin>>a>>b;
Sum=num1+num2;
cout<< " Sum of two number :: "<<Sum;
return 0;
}
output
Enter the value of number 1 and number 2 = 10 ↲
20 ↲
Sum of two number :: 30
Thanks for visit this page and Support me.
No comments:
Post a Comment