Question
IN C++ Instructions The program in the Programming Example: Fibonacci Number does not check: Whether the first number entered by the user is less than
IN C++
Instructions
The program in the Programming Example: Fibonacci Number does not check:
-
Whether the first number entered by the user is less than or equal to the second number and whether both the numbers are nonnegative.
-
Whether the user entered a valid value for the position of the desired number in the Fibonacci sequence.
Rewrite that program so that it checks for these things.
NOTES:
-
If an invalid number is entered for case 1 above, prompt the user to enter both numbers again.
-
If an invalid number is entered for case 2, prompt the user to enter a value until a valid value is entered.
Step 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