Question PSC-LOOP-0071
HardWhat will be the output of the following pseudocode?
Integer n = 7, f1 = 1, f2 = 1, i
for (each i from 3 to n)
f2 = f1 + f2
f1 = f2 - f1
end for
Print f2
- A.
13
- B.
7
- C.
Sign up free to see the answer and a step-by-step explanation.