June 2017
Beginner
1296 pages
69h 23m
English
Counter-controlled iteration (p. 165) requires a control variable, the initial value of the control variable, the increment by which the control variable is modified each time through the loop (also known as each iteration of the loop) and the loop-continuation condition that determines whether looping should continue.
You can declare a variable and initialize it in the same statement.
for Iteration StatementThe while statement can be used to implement any counter-controlled loop.
The for statement (p. 166) specifies all the details of counter-controlled iteration in its header.
When the for statement begins executing, its control variable is declared and initialized. ...