Question PSC-LOOP-0055
MediumWhat will be the output of the following pseudocode?
Integer n = 10, a = 0
while (n > 0)
a = a + n
n = n - 2
if (a > 20)
break
end if
end while
Print a, n
- A.
18 4
- B.
24 4
- C.
Sign up free to see the answer and a step-by-step explanation.