Q:

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

belongs to collection: C++ Basic Solved Programs

0

Write a C++ Program to find Addition of Two Numbers. Here’s simple Program to Add Two Numbers in C++ Programming Language.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Here is source code of the C++ Program to find Addition of Two Numbers. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.

 
 

SOURCE CODE : :

/*  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<<"\nEnter second number :: ";
    cin>>y;

    sum=x+y;

    cout<<"\nSum of two numbers [ "<<x<<" + "<<y<<" ] = "<<sum<<"\n";

    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

Above is the source code for C++ Program to Add Two Numbers which is successfully compiled and run on Windows System.The Output of the program is shown above .

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Basic Solved Programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C++ Program to Convert Days Into Years Wee... >>
<< Write a C++ Program to raise any number X to power...