Question
C++ Programming - Fibonanchi Sequence USING STACK!!!! In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence: 1,1,2,3,45,8,13,21.... By
C++ Programming - Fibonanchi Sequence USING STACK!!!!
In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence: 1,1,2,3,45,8,13,21....
By definition, the first two numbers in the Fibonacci sequence are 1 and 1, and each subsequent number is the sum of the previous two.
In this programming exercise, you are required to realize a Fibonacci number generator. Assume the position number in the Fibonacci sequence starts from 1, and once the user enters a certain position number, the generator program should output the value of Fibonacci number at that position. For example, when user input 20, the program should be able to print out The Fibonacci number at position 20 is 6765.
The program should be able to generate very large numbers (exceeding the range of unsigned long long (0 to 18,446,744,073,709,551,615)). Use stack (creating a function addLarge()) data structure to realize this large number addition. Hint- Instead of Integers use Strings. For example, if the user input 120, the output should be The Fibonacci number at position 120 is 5358359254990966640871840.
You have to create another function using the stack data structure to realize large numbers!!! Please help!! Will rate!! See below for example outputs!!!
P 1203-01 Programming ExerciseslPE3x64lDebuglPE3.exe Please enter the position number in the Fibonacci sequence 20 The Fibonacci number at position 20 is 6765Step 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