+ 1

fib function

Dear colleagues, can someone please explain this fib function (a step by step of what is hapening in each iteration)? From what I see, the function cannot return any number higher than 1, so summing fib(x-1)+fib(x-2) should not give a number higher than 2... But the right answer is 5.

25th Jan 2019, 8:19 AM
André Santos
André Santos - avatar
1 Answer