Recursion Quiz - Fib Computer Problem
Recursion Quiz - Fib Computer Problem
The so-called Fibonacci sequence is a series of numbers that begins with 1, 1, 2, 3, 5, …. After
the first two ones, each number is determined by adding the previous two (2=1+1, 3=2+1, etc…).
For example,
F3 = F2 + F1, so F3 = 1 + 1 = 2
and
F4 = F3 + F2, so F4 = 2 + 1 = 3.
Your task:
1. Write a recursive method, using the heading below, to generate the nth Fibonacci
number.
2. Use this method in a program to generate the first n Fibonacci numbers, with n defined
by the user.