Pseudocode - Iteration (Loops)

Iteration means repeating instructions. You will compare FOR loops, which repeat a fixed number of times, with WHILE loops, which check the condition first, and REPEAT UNTIL loops, which always run at least once.

Key terms

Iteration
Repeating a set of instructions.
FOR loop
A count-controlled loop that repeats a fixed number of times.
WHILE loop
Checks the condition at the start, so it may never run.
REPEAT UNTIL loop
Checks the condition at the end, so it always runs at least once.
Infinite loop
A loop that never ends because its condition never becomes false (or true, for REPEAT UNTIL).

Part of Algorithm Design & Problem Solving.