// counting.cpp // Bob Myers // // A typical kind of for-loop algorithm #include int main() { for (int counter = 0; counter < 10; counter++) { // loop body } printf("%d\n",counter); // illegal. counter out of scope return 0; }