Numerical analysis
The Fibonacci Sequence is 0, 1, 1, 2, 3, 5, 8, 13,........: the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms:
Fib[n] = Fib[n-1] + Fib[n-2]
Using this information write a C++ program that Calculates the Fibonacci sequence to the 50th and 100th sequence [you need a counter]. The numbers must be entered by the student [this requires a cin] for each sequence. You need a function to run both the 50 and 100. Only 2 functions in the main function [the same function, which is named fibs].
Example the numbers above 0 ➔13 if n=6 the sequence would stop at 5.
Printing:
Header with your name, assignment # and date.
Title of n [50 or 100]
The sequence of each number in series for each sequence.
Example n= 6 you would print: n=6 Fib Seq: 0, 1, 1, 2, 3, 5