for Repetition Statement
In most cases, the for statement can be represented with an equivalent while statement as follows
The one exception occurs when the increment expression in the while statement follows a continue statement. In this case, the increment does not execute before the program evaluates the loop-continuation condition, so the while statement does not execute in the same manner as the for statement. The for statement is typically used for count-controlled repetition. |
Loops while do...while for Control Structure Loop Design Methodology Common Loop Errors |
|
<< Back | ||
Fook Yuen Sin - Team 1 |