Monday, March 3, 2014

Sum or Addition in C++

#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  is = " << c << endl;
   return 0;
}

No comments:

Post a Comment