The repetition structure is an extremely powerful design structure. A group of instructions can be placed in a loop in order to be carried out repeatedly; this group of operations is called the repetition group. The number of times the repetition group is carried out depends on the condition of the loop.
There are three loop constructs: while loop, loop until, and for loop. In the while and for loops, the loop condition is tested first, and then the repetition group is carried out if the condition is true. The loop terminates when the condition is false. In the loop-until construct, the repetition group is carried out first, and then the loop condition is tested. If the loop condition is true, the loop terminates; otherwise, the repetition group is executed again.