Question PSC-LOOP-0040
EasyWhat will be printed by the following pseudocode?
Integer a = 0
for (each i from 1 to 5)
for (each j from 1 to 5)
if (i == j)
a = a + 1
end if
end for
end for
Print a
- A.
1
- B.
10
- C.
Sign up free to see the answer and a step-by-step explanation.