subject

Write a program that determines the change given back to a customer in a self-service checkout machine of a supermarket for purchases of up to $50. The program generates a random number between 0.01and 50.00 and displays 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 calculates 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 $10 bill is entered as payment, then the change is one $5 bill, two $1 bills, two quarters, one dime, one nickel, and two pennies. Execute the program three times.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 22.06.2019 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
question
Computers and Technology, 24.06.2019 20:30
Which key should you press to leave the cell as it originally was? a. delete b. cancel c. backspace d. enter
Answers: 1
You know the right answer?
Write a program that determines the change given back to a customer in a self-service checkout machi...
Questions
question
Mathematics, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Geography, 09.09.2020 23:01
question
English, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Arts, 09.09.2020 23:01
question
English, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Biology, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
Health, 09.09.2020 23:01
question
Biology, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
question
History, 09.09.2020 23:01
question
Mathematics, 09.09.2020 23:01
Questions on the website: 13722363