Write a C++ Program to find Addition of Two Numbers.



Write a C++ Program to find Addition of Two Numbers...

Answer / 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

More C++ Interview Questions

What is static variable and difference between(const char *p,char const *p,const char* const p).

0 Answers   Accenture,


What Is A Default Constructor in C++ ?

0 Answers   Amazon,


Difference between function overloading and function overriding.

0 Answers   Alter,


How to run C++ program in cmd

0 Answers  


Explain function prototypes in C++.

0 Answers   Aricent,






What is the difference between an ARRAY and a LIST in C++?

0 Answers   IBS, TCS,


What is Copy Constructor?

5 Answers   ABC, Siemens,


What is a virtual base class?

6 Answers   Fidelity, Siemens,


What is a virtual function in C++?

0 Answers   C DAC,


Explain encapsulation in C++.

0 Answers   Verifone,


Tell How To Check Whether A Linked List Is Circular ?

1 Answers   IBS, Infosys,


What is conversion constructor in C++

0 Answers   TCS,


Categories