Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 6 - No. 22)

Which loop structure is best used when the number of iterations is known before the loop starts?
REPEAT ... UNTIL
WHILE ... DO ... ENDWHILE
FOR ... TO ... NEXT
IF ... THEN ... ELSE ... ENDIF

Explanation

The FOR loop is specifically designed for iterating a predetermined number of times.

Comments (0)

Advertisement