//DISPLAY 3.12 A for Statement //Illustrates a for loop. #include using namespace std; int main( ) { int sum = 0; for (int n = 1; n <= 10; n++) //Note that the variable n is a local sum = sum + n; //variable of the body of the for loop! cout << "The sum of the numbers 1 to 10 is " << sum << endl; return 0; }