// Oldham, Jeffrey D. // 1999 Sep 07 // CS 1320 // // Program to Add Many Integers // input <- Prompted by the program, the user types zero or more integers. // output-> The integers' sum is printed. // We are now working on the sum. #include int main() { int second_integer; int sum = 0; // The sum of no integers is zero. while (/* add test of when to stop */) { cout << "Please enter an integer: "; cin >> second_integer; sum += second_integer; // Add the integer to the sum. } cout << "The sum is " << sum << ".\n"; return 0; }