To add two numbers by taking data from user
#inlude<iostream>
using namespace std;
int main()
{
int a,b,sum;
cout<<“Enter first number”;
cin<<a;
cout<<“Enter second number”;
cout<<b;
sum=a+b;
cout<<“Sum of given numbers is”<<sum;
return 0;
}
To add two numbers by taking data from user
#inlude<iostream>
using namespace std;
int main()
{
int a,b,sum;
cout<<“Enter first number”;
cin<<a;
cout<<“Enter second number”;
cout<<b;
sum=a+b;
cout<<“Sum of given numbers is”<<sum;
return 0;
}
Former student of IIIT Delhi. Beginning a startup. Loves teaching and blogging. Will provide you best of my knowledge. View more posts