Computer Science for IGCSE & O level - Programming (Section 13 - No. 18)

If the value of 'age' is 10 and the following code executes, what will be printed? ``` IF age >= 17 THEN Print "You are an adult" ELSE Print "You are a child" ENDIF ```
You are a child
You are an adult
Nothing will be printed.
The program will encounter an error.

Explanation

Because 10 is not >= 17, the ELSE part will be executed, thus printing 'You are a child'.

Comments (0)

Advertisement