Question PSC-COND-0017
HardWhat will be the output of the following pseudocode?
Integer x = 7
if (x mod 2 == 1)
x = x * 3
else
x = x / 2
end if
if (x > 20)
x = x - 1
else
x = x + 1
end if
Print x
- A.
22
- B.
20
- C.
Sign up free to see the answer and a step-by-step explanation.