C++ Program To Print Sum of Two Numbers

C++ Program To Print Sum of Two Numbers

For Example, if you consider two numbers 5 and 6 then the sum print on the screen is 11.


#include<iostrem.h>
#include<conio.h>
int main()
{ 
clrsrc();
int n1,n2,sum;
cout<<"Enter the number1:";
cin>>n1;   
cout<<"Enter the number2:";
cin>>n2; 
sum=n1+n2;
cout<<"Sum of number1 and number2 is:";
cout<<"sum";
return0;
} 


OUTPUT:

Enter the number1:5
Enter the number2:6
Sum of number1 and number2 is:11


NOTE: You have any problem in above C++ Program do not hesitate and write your problem in the comment box. I will support your problem.

If you have any doubts, Please let me know

Previous Post Next Post

Contact Form