top of page

Write C++ Program to Add two numbers.



#include <iostream>
using namespace std;

int main() {
  int x, y;
  int sum;
  cout<<"Adding Two Numbers"<<endl;
  cout << "Enter First number: ";
  cin >> x;
  cout << "Enter Second number: ";
  cin >> y;
  sum = x + y;
  cout << "Sum of two Numbers = : " << sum;
  return 0;
}


Output:



Read More:

C++ Program to Multiply two Numbers




Sofia Singh

The Tech Platform

www.thetechplatform.com

0 comments
bottom of page