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

Which statement is best for a scenario that needs different actions depending on the *value* of a variable?
IF ... THEN ... ELSE
FOR...TO...NEXT
WHILE...DO...ENDWHILE
CASE...OF...OTHERWISE

Explanation

The CASE statement is designed to efficiently handle multiple possible values of a variable.

Comments (0)

Advertisement