Write a C++ Program to find Addition of Two Numbers.
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 |
How to reverse a string in C++
What are Agilent PRECOMPILERS?
What is wrong with this statement? std::auto_ptr ptr(new char[10]);
Explain the difference between C and C++.
Can we provide one default constructor for our class?
Consider the following C++ program
In C++ what is the meaning of data hiding?
What are string library functions(syntax).
How does free know the size of memory to be deleted
How will you execute a stack using a priority queue? (Push and pop should be in O (1)).
What is the difference between Stack and Queue in C++?
0 Answers Global Logic, iNautix,
Is deconstructor overloading possible? If yes then explain and if no Then why?