Entry Controlled Loop: Unfixed Iteration
Learn about the contribution of branching statements on controlling the behavior of a program in this lesson.
Coding example: 58
The following example deals with another interesting part of code statements, branching statements. By using continue and break keywords, we can control the movement of a loop. First, see the example provided below:
Code explanation
In the first case, the continue keyword skips a certain value and the loop continues. In the second case, when the iteration matches the exact value, it no longer moves. The loop terminates at that particular point. Look at the output, ...