How to calculate sum of two numbers C++ program

CWC
0 Min Read

Write C++ program to calculate sum of two numbers

#include
using namespace std;
int main()
{
int sum,a,b;
cout<<"Enter value of a:"<<endl; cin>>a;
cout<<"Enter value of b:"<<endl; cin>>b;
cout<<"The sum of a and b is "<<(a+b);
return 0;
}
Share This Article
Leave a comment

Leave a Reply

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

English
Exit mobile version