// This program calculate and print the sum of three digits.
#include <iostream>
#include <limits>
using namespace std;
int main()
{
// input variables.
int num1;
int num2;
int num3;
// inputs
cout << "enter your first digit = ";
cin >> num1;
cout << "enter your second digit = ";
cin >> num2;
cout << "enter your third digit = ";
cin >> num3;
// process
cout << "your sum is = ";
cout << num1+num2+num3;
// ending
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cin.get();
return 0;
}
Thursday, 24 January 2013
program 2-2(40) print the sum of three input numbers
08:03
ATEEK
No comments
0 comments:
Post a Comment