Take out a piece of paper. We’ll be programming on paper.
Write a method fibonacci that takes an integer parameter N and returns the Nth fibonacci number.
Fibonacci numbers are defined by the formula Fn = Fn - 1 + Fn - 2. The Fibonacci sequence starts with F0 = 0 and F1 = 1.
The first 10 Fibonacci numbers are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34.
Start to write a method
Implement the base case for the recursion.