subject

The vending machine sells three types of food: 1) Potato chips $1.25; 2) Cookies $0.85; 3) Candies $0.95. The program will prompt for the buyer to enter the amount in quarters (25 cents), dimes (10 cents), and nickels (5 cents). The program will then present a selection menu for the foods. The buyer makes a selection. If the buyer selects a food that is sold out, the program will display a message and redisplay the selection menu. If the buyer has put in enough money, the selected food will be dispensed, with a message "Please take a your (food)". If the amount is more than the cost, an appropriate amount of change (in quarter, dime or nickel) will be dispensed. Every food is initialized with a quantity. The quantity is reduced by one every time the food is dispensed. When the quantity of a food is 0, no more should be sold, with an error stating "Sold out. Please make another choice". Note: 1 dollar = 4 quarters = 10 dimes = 20 nickels 1 dollar = 100 cents 1 quarter = 25 cents 1 dime = 10 cents 1 nickel = 5 cents

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Dr. wisteria is a prominent chiropractor in the chicago area. she wants to provide a forum for her patients to discuss their health concerns and to seek and offer advice to other patients. which telecommunications tool is most appropriate for dr. wisteria's needs?
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
You know the right answer?
The vending machine sells three types of food: 1) Potato chips $1.25; 2) Cookies $0.85; 3) Candies $...
Questions
question
Mathematics, 27.02.2021 01:00
question
Mathematics, 27.02.2021 01:00
question
Mathematics, 27.02.2021 01:00
Questions on the website: 13722360