Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedCode 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

Students also viewed these Databases questions