Question: Create a program that could be used in a Coffee Corner store to calculate customer change. The program should prompt for a specific product,

Create a program that could be used in a Coffee Corner store to calculate customer change. The program should prompt for a specific product, for the cost of the product, and for the dollar amount customer has provided. Yes, we are using cash. Calculate change by using largest denominations first. For example, if change due is $7.98 the change would involve 1 $5 bill, 2 $1 bills, 3 quarters, 2 dimes, 3 pennies. HINTS: 1. Your input for both cost and customer amount paid will involve decimal values. Convert these to an equivalent representation that is integer. You need to keep the numbers (pennies) that were to the right of decimal point; you just want to shift the decimal point. How would you do this? 2. Refer to the example worked in class on 2/7 for hours, minutes, and seconds. Script will be posted to the InClass assignment on course site. 3. I strongly recommend that you start simple. Make your program work first for returning nickels and pennies only. Then make it work for dimes. Modify again for quarters and so on. Your goal is to get up to $5 bill.
Step by Step Solution
There are 3 Steps involved in it
Code def calculatechangecost amountpaid Convert cost and amount paid to cents integer representat... View full answer
Get step-by-step solutions from verified subject matter experts
