Essentials of Counter-Controlled Repetition


Counter-controlled repetition requires:

Identify the parts named above in the While Counter applet.

I like initializing variables in the declaration, where it makes sense to do so. It's a matter of taste.

We could increment counter inside the while condition, rather than as a separate statement.

Would you prefer that?