Print the sum of two numbers:
-----------------------------------
The sum of 29 and 30 is: 59
#include<iostream>
using namespace std;
int main()
{
int a,b,sum;
cout<<"enter your first number: ";
cin>>a;
cout<<"enter your second number: ";
cin>>b;
sum=a+b;
cout<<sum;
return 0;
}
Output:
Tags
c++