//Illustrates a for-loop. #include int main( ) { int sum = 0; for (int n = 1; n <= 10; n++) sum = sum + n; cout << "The sum of the numbers 1 to 10 is " << sum << endl; return 0; }