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
int add(int a, int b); void ReadStdIn(); int WriteOut(std::string output); int WriteOut(int output); int WriteOut(double output); std::vector
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started