Wednesday 4 February 2015

C++ program to add two numbers

C++ program to add two numbers

#include <iostream>
 
using namespace std;
 
int main()
{
   int a, b, c;
 
   cout << "Enter two numbers to add\n";
   cin >> a >> b;
 
   c = a + b;
   cout <<"Sum of entered numbers = " << c << endl;
 
   return 0;
}


No comments:

Post a Comment