Question PSC-LOOP-0073
HardWhat does the following pseudocode print?
Integer i, j, total = 0
for (each i from 1 to 5)
for (each j from 1 to 5)
if (i == j)
continue
end if
if (i + j == 6)
break
end if
total = total + 1
end for
end for
Print total
- A.
9
- B.
15
- C.
Sign up free to see the answer and a step-by-step explanation.