Write a C++ Program to find Addition of Two Numbers.
Answer Posted / hr
Solution:
/* C++ Program to find Addition of Two Numbers */
#include<iostream>
using namespace std;
int main()
{
int x,y,sum;
cout<<"Enter first number :: ";
cin>>x;
cout<<"
Enter second number :: ";
cin>>y;
sum=x+y;
cout<<"
Sum of two numbers [ "<<x<<" + "<<y<<" ] = "<<sum<<"
";
return 0;
}
Output:
/* C++ Program to find Addition of Two Numbers */
Enter first number :: 12
Enter second number :: 34
Sum of two numbers [ 12 + 34 ] = 46
Process returned 0
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the auto storage classes in c++.
How would you obtain segment and offset addresses from a far address of a memory location?
In what scenario does the Logical file and Physical file being used?
Tell me what are static member functions?
Write my own zero-argument manipulator that should work same as hex?
What is new keyword in oops?
What is object-oriented programming? Webopedia definition
What is object and class in oops?
Explain what you mean by a pointer.
What are the advantages of using typedef in a program?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What is cout flush?
What is the most useful programming language?
How can I learn c++ easily?
What are "pure virtual" functions?