Question PSC-COND-0020
HardWhat will be the output of the following pseudocode?
Integer x = 3, y = 0
if (x > 2)
y = y + 1
end if
if (x > 1)
y = y + 2
else if (x > 0)
y = y + 4
end if
if (x > 4)
y = y + 8
end if
Print y
- A.
7
- B.
11
- C.
Sign up free to see the answer and a step-by-step explanation.