Quiz on Conditional Statements

Test your knowledge of conditional statements.

1

If n1, n2, and n3 are equal to 5, 7, and 1, respectively, what is the output of the following pseudocode:

INPUT n1, n2, and n3
IF n1 > n2
    temp = n1
ELSE
    temp = n2
IF n3 > temp
    num = n3
ELSE 
    num = temp
OUTPUT num
A)

5

B)

7

C)

1

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.