Question PSC-OPS-0056
MediumWhat will be the output of the following pseudocode?
Integer count = 0, i
for (each i from 1 to 30)
if (i mod 2 == 0 and i mod 3 == 0 or i mod 5 == 0)
count = count + 1
end if
end for
Print count
- A.
5
- B.
9
- C.
Sign up free to see the answer and a step-by-step explanation.