Question PSC-COND-0015
HardWhat will be the output of the following pseudocode?
Integer f = 0, b = 0, fb = 0
for (each i from 1 to 30)
if (i mod 15 == 0)
fb = fb + 1
else if (i mod 3 == 0)
f = f + 1
else if (i mod 5 == 0)
b = b + 1
end if
end for
Print f, b, fb
- A.
8 4 2
- B.
10 4 2
- C.
Sign up free to see the answer and a step-by-step explanation.