C++ Program To Add Two Numbers

Write C++ Program to Add Two Integer Numbers

// Write C++ program to add two numbers

#include <bits/stdc++.h>
using namespace std;

int main()
{
     int n1,n2;

     cout << "Enter the Number 1:--> " ;
     cin >> n1 ;

     cout << "Enter the Number 2:--> " ;
     cin >> n2 ;

     int c = n1 + n2;
     cout << "Addition : " << n1 << " + " << n2 << " = " << c;

    return 0;
}

Output:

Enter the Number 1:–> 55
Enter the Number 2:–> 66

Addition : 55 + 66 = 121


<< Previous | Next >>