Description
We’ve developed a new cash register and like most machines, it subtracts the amount owed from the amount received to determine how much money the cashier must return to the customer. However, to avoid some human error, we automatically return the correct change through a coin dispenser. As our company’s only software engineer, you need to write the code this function.
You are to accept two amounts: the amount owed, and the amount received. Print a series of messages indicating how many dollars, quarters, dimes, nickels and cents are to be returned. For the dollar amount, just specify a whole number. It is not necessary to break it up into $10s, $5s or $1s. Also note that our coin dispenser does not hand out dollar coins or 50 cent pieces.
If the user provides less than the amount owed, print an error message which includes the amount short and terminate the program. The error message should look something like the following:
*** You did not provide enough money. You are $1.45 short. ***






