Note AcademyNote Academy

Computer Science · Oct / Nov 2016 · Paper 1 HL · Question 6

IBCS

As printed in the paper

The question as text

6. Consider the following recursive algorithm FUN(X, N), where X and N are two integers. FUN(X, N) if N<=0 then return 1 else return X*FUN(X, N-1) end if The return statement gives the value that the algorithm generates.

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 6(a)[1]

  • 6(b)[3]

  • 6(c)[1]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.