Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a console app to calculate a Fibonacci number(See Fibonacci in Wikipedia if you don't know what is Fibonacci ) based on user's input. It
Create a console app to calculate a Fibonacci number(See Fibonacci in Wikipedia if you don't know what is Fibonacci ) based on user's input. It helps you review vector, conditional statement, and loop.Specification
Your app runs like the screenshot below :
(1) Run MS Visual Studio 2019 to create a Console App; (2) The app asks the user to input an index number (say n); (3) The app checks if the index number is less than 2 or not. If yes, the app shows an error message and exits with code 1; (4) Otherwise, the app uses a vector of integers to calculate and store Fibonacci numbers with index numbers from 0 to n. The formula is: Fibo = 0, Fib1 = 1, Fibn = Fibn-2 + Fibn-1; _ SM Microsoft Visual Studio Debug Console Enter an index number (>= 2): 15 The 15-th Fibonacci number: 610 D:\Teaching\Spring2021\CPSC246\Homework\HW02\Fibonacci\Debug\Fibonacci.exe (process 31648) exited with code 0. To automatically close the console when debugging stops, enable Tools->Options ->Debugging->Automatically close the console when debugging stops. Press any key to close this windowStep 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