Question PSC-LOOP-0015
MediumWhat will be the output of the following pseudocode?
Integer total = 0
for (each i from 1 to 10)
if (i == 7)
break
end if
if (i mod 2 == 0)
continue
end if
total = total + i
end for
Print total
- A.
9
- B.
16
- C.
Sign up free to see the answer and a step-by-step explanation.