Question: Code in C++ Requirement (What you need to do) write a program that takes as input a dollar amount, and then displays the dollar amount
Code in C++
Requirement (What you need to do)
write a program that takes as input a dollar amount, and then displays the dollar amount in English (similar to how you would write the amount in a check).
Use case (Scenario)
$PrintDollar Enter the dollar amount:$23.45 It's twenty three and 45/100 Try again(y/n):n Bye!
Error handling: You are required to handle the following error inputs. If the input is any of the following case, your program should display appropriate error message, and ask the user to try again.
- The dollar amount cannot be greater than 9999.99
- The dollar amount cannot be negative
- There are at most two decimal digitals in the input
- Handle non-digit input, such as ten
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
