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

What is the primary function of the 'IF-THEN-ELSE' construct in programming?
To define variables.
To handle different code paths based on a condition.
To display output.
To repeat a set of instructions.

Explanation

The IF-THEN-ELSE structure allows for conditional execution of code.

Comments (0)

Advertisement