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 the point of polymorphism?
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What are separators in c++?
What is const pointer and const reference?
Differentiate between late binding and early binding.
Which function cannot be overloaded c++?
What is the use of vtable?
What is pointer -to-members in C++? Give their syntax?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Should the this pointer can be used in the constructor?
Keyword mean in declaration?
What does floor mean in c++?
What do you mean by function and operator overloading in c++?
How do you compile the source code with your compiler?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random