In mathematics, the Fibonacci numbers are the series of numbers that exhibit the following pattern:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …
In mathematical notation the sequence Fn of Fibonacci numbers is defined by the following recurrence relation:
With the initial values of F0 = 0 and F1 = 1. Thus, the next number in the series is the sum of the previous two numbers. Write a program that asks the user for a positive integer N and generates the Nth Fibonacci number. Your main function should handle user input and pass that data to a function called Fib that takes an integer value N as input and a reference parameter that is assigned the Nth Fibonacci number.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.