Question PSC-LOOP-0074
HardWhat will be printed by the following pseudocode?
Integer n = 10, s = 0, k
for (each k from 1 to n)
s = s + k * (n - k + 1)
end for
Print s
- A.
385
- B.
220
- C.
Sign up free to see the answer and a step-by-step explanation.