What will be the output of the following pseudocode? Values printed in the loop appear on one line, separated by spaces.
Integer i, total
Set i = 1, total = 0
while (i < 9)
i = i + 2
total = total + i
Print total
End while1 4 9 16
3 8 15 24
3 8 15 24 35
1 4 9 16 25
The verified answer and full solution are one login away
Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks this full mock in the real exam interface.
Log in to see the answer