Computer Science · Oct / Nov 2018 · Paper 23 · Question 5
2210
As printed in the paper
The question as text
The algorithm allows a number to be entered. It then calculates and outputs the next number in the mathematical series. Fib 1 Prev2 0 Prev1 1 INPUT Number IF Number = 0 THEN Fib 0 ENDIF WHILE Number > 2 Fib Prev2 + Prev1 Prev2 Prev1 Prev1 Fib Number Number - 1 ENDWHILE OUTPUT Fib
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
5(a)[4]
5(b)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

