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
What is c++ coding?
What is a class template?
Difference between an inspector and a mutator
Tell me can a pure virtual function have an implementation?
What is the difference between passing by reference and passing a reference?
Why do we use setw in c++?
What are c++ redistributables?
What does n mean in c++?
Define a nested class. Explain how it can be useful.
How can you link a c++ program to c functions?
How many namespaces are there in c++?
How are pointers type-cast?
Can non graphic characters be used and processed in C++?
an operation between an integer and real always yeilds a) integer result b) real result c) float result
What is late binding c++?