Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 1 – Implement the Recursive Version of the Fibonacci Function implement a r

ID: 3630582 • Letter: P

Question

Part 1 – Implement the Recursive Version of the Fibonacci Function
implement a recursive version of a function to calculate a given Fibonacci number if you are given the population of the first two generations. Remember to include both a base case and a recursive case in your function design.

Part 2 – Another Way to Go About Things
Now, implement the following versions of the calculation:

Version 1 – Implement an Iterative Version of the Fibonacci Function
Implement an iterative version of the function to calculate a given Fibonacci number.

Version 2 – Implement a Direct Calculation for the Fibonacci Function
Binet’s Formula allows you to calculate the nth number of the Fibonacci Sequence directly.

I've created a program that calculates the Fibonacci any number of the Fibonacci sequece, but im pretty sure it not what the program is asking for..


Explanation / Answer

/*program to generate fibonacci series upto n terms using recursion*/ #include #include main() { int i,n,f=0; int fib(); clrscr(); printf("enter the number of elements "); scanf("%d",&n); for(i=0;i