Electrical and Computer Engineering
6 of 23
UAH
CPE 112
Count-Controlled Loops
•A loop control variable is used – it must be initialized before it is tested and it must be updated in the body of the loop.
•Example:
–loopCount = 1;   
–while (loopCount <= 10) loop test
–{
•.
•.
•.
•loopCount = loopCount + 1;
–}