Question PSC-LOOP-0062
HardWhat will be printed by the following pseudocode?
Integer n = 6, i, j, s = 0
for (each i from 1 to n)
for (each j from i to n step i)
s = s + 1
end for
end for
Print s
- A.
12
- B.
36
- C.
Sign up free to see the answer and a step-by-step explanation.