Question PSC-COND-0066
HardWhat will be printed by the following pseudocode?
Integer n = 0, i
for (each i from 1 to 20)
if (i mod 2 == 0)
if (i mod 3 == 0)
n = n + 10
else
n = n + 1
end if
else if (i mod 5 == 0)
n = n + 100
end if
end for
Print n
- A.
237
- B.
337
- C.
Sign up free to see the answer and a step-by-step explanation.