#include using namespace std; int main(int argc, char *argv[]) { int i; // declare counter variable, i, used in the for loop int total = 0; // declare & initialize variables for input and running total int number = 0; for ( i=1; i<=50; i++) // loop for input of 5 numbers and running total { number++; cout << number << endl; total += number; // "total += number" is the same as "total = total + number" } cout << "The total is: " << total << endl; system("PAUSE"); return 0; }