Question PSC-LOOP-0047
MediumWhat does the following pseudocode print?
Integer i, j
for (each i from 1 to 4)
for (each j from 1 to i)
if (j == 3)
break
end if
Print j
end for
end for
- A.
1 1 2 1 2 1 2 3
- B.
1 2 1 2
- C.
Sign up free to see the answer and a step-by-step explanation.