Question: In this project, you will write a recursive program to calculate the n th Fibonacci number. Fibonacci numbers are defined according to the formula below:

In this project, you will write a recursive program to calculate the nth Fibonacci number. Fibonacci numbers are defined according to the formula below:

F(0) = 0, F(1) = 1;

F(n) = F(n-1) + F(n-2) for n > 1

Name your function Fibonacci. It will take an integer parameter for the value of n, and return an integer that is the nth Fibonacci number.

A main should not be necessary, but if it is required name it testerMain.cpp.

Review.h Files:

#include #include

int add(int a, int b); void ReadStdIn(); int WriteOut(std::string output); int WriteOut(int output); int WriteOut(double output); std::vector InitializeArray(int size); void ReadStdIn2(); void ReadWrite(); void LoopThrough(double * data, int size); int Fibonacci(int a);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!