Question PSC-OPS-0077
HardWhat will be the output of the following pseudocode?
Integer s = 0, i
for (each i from 1 to 10)
s = s + (i mod 3 == 0 ? i * i : (i mod 2 == 0 ? i : 0))
end for
Print s
- A.
171
- B.
150
- C.
Sign up free to see the answer and a step-by-step explanation.