Question PSC-COND-0046
MediumWhat will be printed by the following pseudocode?
Integer n = 7, r = 0
if (n mod 2 == 1)
r = r + 1
end if
if (n > 5)
r = r + 10
else if (n > 3)
r = r + 100
end if
Print r
- A.
11
- B.
101
- C.
Sign up free to see the answer and a step-by-step explanation.