C++ FibonacciComplete ComputeFibonacci() to return FN, where F0 is 0, F1 is 1, F2 is 1, F3 is 2, F4 is 3, and continuing: FN is FN-1 + FN-2. Hint: Base cases are N == 0 and N == 1.#include using namespace std;int ComputeFibonacci(int N) {cout << "FIXME: Complete this function." << endl;cout << "Currently just returns 0." << endl;return 0;}int main() {int N = 4; // F_N, starts at 0cout << "F_" << N << " is "<< ComputeFibonacci(N) << endl;return 0;}

Respuesta :

Check the base cases first within the function ComputeFibonacci, which only accepts one parameter, N. Return 0 if N is equal to 0.If N is 1, then return 1. Otherwise, use N-1 and N-2 as parameters when calling the ComputeFibonacci function.

Do Fibonacci numbers go on forever?

Whole numbers are used in the Fibonacci sequence, which goes as follows: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,... Each term in this endless series, which begins with 0 and 1, is the combination of the two terms before it.

Who is the person whose Fibonacci sequence is well known?

According to a lot of sources, Leonardo Fibonacci is credited with discovering or "inventing" this sequence. The Italian mathematician Leonardo of Pisa, who was born about A.D. 1170, was first recognized by this name.

To know more about Fibonacci visit:

https://brainly.com/question/29764204

#SPJ4

RELAXING NOICE
Relax