Write a program in C++ to add two numbers and display the result.

  WAP in C++ to add two numbers and display the result
 #include <iostream>
using namespace std;

int main(){
       int a, b,c;
       cout << "Enter Number" << endl;
       cin >> a;
       cout << "Enter Number" << endl;
       cin >> b;
       c = a + b;
       cout << "The sum of number is " << b;
       cin.ignore();
       return 0;


}

Comments