Question: The fibonacci sequence is a famous recursively built sequence. It is defined as: The two base cases: fib ( 1 ) = 1 fib (
The fibonacci sequence is a famous recursively built sequence. It is defined as:
The two base cases:
fib
fib
And the recursive formula:
fibn fibn fibn
Example: fib fib fibfib fibfib fib
fibfib
In C:
int fibint n
if n n
return ;
else
return fibn fibn;
Assignment: Write a program that uses the recursive Fibonacci function using the clock
function, in CC to compute the time it takes to run the program. Run a number of
simulations run the program of this program and record the times to takes to compute various
Fibonacci numbers. You could enter your results in a table andor graph and discuss the
results. If you use any references and perhaps you should you must list them in the
bibliography or references
Your written work should have an introduction an abstract of what you want to show or what
you conjecture is true; then the results and then a conclusion. In the introduction you should
describe the program, what it is; how it was written and description of inputoutput
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
