/************************************************************************ * * * Program: SumOfThreeInts.cpp * * * * Author: Robb T. Koether * * * * Date: Sep 9, 2003 * * * * Purpose: This program will add three integers * * * ************************************************************************/ // Header files #include #include using namespace std; /************************************************************************ * * * Function: main * * * * Purpose: To add three integers and print the result * * * ************************************************************************/ int main() { // Get two integers from the user cout << "Enter an integer: "; int first; cin >> first; cout << "Enter another integer: "; int second; cin >> second; cout << "Enter another integer: "; int third; cin >> third; // Add the three integers int sum = first + second + third; // Print the result cout << "The sum is " << sum << endl; return 0; }