Question PSC-FUNC-0054
MediumWhat is the output of this pseudocode?
Integer calls = 0
Function t(Integer n)
calls = calls + 1
if (n <= 1)
return 1
end if
return t(n - 1) + t(n - 2)
End Function
Integer r = t(5)
Print r, calls
- A.
5 15
- B.
8 9
- C.
Sign up free to see the answer and a step-by-step explanation.