Recursion


The Fibonacci sequence is a series of numbers that are created by adding the two previous numbers together.

Fib(0) is defined as 0
Fib(1) is defined as 1
Fib(n) is Fib(n-1) + Fib(n-2)

Write a C++ recursive function to compute the nth Fibonacci number.

In the main program, call Fib with this code:
cout << Fib (5) << endl;
cout << Fib (10) << endl;
cout << Fib (46) << endl;
cout << Fib (47) << endl;