Question PSC-LOOP-0007
EasyWhat will be the output of the following pseudocode?
Integer a = 10
while (a > 0)
a = a - 3
end while
Print a
- A.
1
- B.
-3
- C.
Show answer and explanation
Answer: C
a goes 10, 7, 4, 1, −2; the loop stops when a is no longer positive.