Question: Code in Matlab please Write a program that determines the change given back to a customer self-service checkout machine of a super The program generates
Code in Matlab please Write a program that determines the change given back to a customer self-service checkout machine of a super The program generates a random number between 0.01 and 50.00 and dis- plays the number as the amount to be paid. The program then asks the user to enter payment, which can be one $1 bill, one $5 bill, one $10 bill, one $20 bill, or one $50 bill. If the payment is less than the amount to be paid, an error message is displayed. If the payment is sufficient, the program calcu- lates the change and lists the bills and/or the coins that make up the change, which has to be composed of the least number each of bills and coins. For example, if the amount to be paid is $2.33 and a S10 bill is entered as pay ment, then the change is one $5 bill, two S1 bills, two quarters, one dime 30. in a market for purchases of up to $50. one nickel, and two pennies. Execute the program three times
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
