Source Code -
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter two numbers: ";
cin>>a>>b;
c=a+b;
cout<<"The sum of the numbers is: ";
cout<<c;
return 0;
}
Program Output -
Enter two numbers: 9
3
The sum of the numbers is: 12
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter two numbers: ";
cin>>a>>b;
c=a+b;
cout<<"The sum of the numbers is: ";
cout<<c;
return 0;
}
Enter two numbers: 9
3
The sum of the numbers is: 12
No comments:
Post a Comment