Question: [ C++ Language ] Write a function that will implement each Fibonacci number with the help of an integer array of size 100 (elements of

[ C++ Language ]

Write a function that will implement each Fibonacci number with the help of an integer array of size 100 (elements of this array will be digits of the Fibonacci number).

When the function is called to find FN, it will calculate all Fibonacci NFnumbers from F2 to FN using the basic formula: FN = F(N-1) + F(N-2).

To add two Fibonacci numbers, the function will add elements of two arrays corresponding to F(N-1) and F(N-2) and store their sums in the array corresponding to FN. (You are NOT supposed to store ALL arrays.)

Calculate Fibonacci numbers containing up to 100 digits. Display the biggest Fibonacci number that has less than 100 digits. Make sure that your program will display the error message when a Fibonacci number has 100 digits or more.

Include commentary.

[ C++ Language ]

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!