Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help write out this program in C++ visual studio Assignment 3: Overview ecome to the vending machine! tem# Item Name Price #in-stock Chips

Can someone help write out this program in C++ visual studio image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Assignment 3: Overview ecome to the vending machine! tem# Item Name Price #in-stock Chips Candy Soda 1.75 3 1.25 1.00 2 nter a number of quarters: 5 mount Entered: $1.25 nter a number between 1 and 3 to make your selection: 3 tem has been dispensed below 0.25 dispensed below ontinue? (Y N): y Item # Item Name Price # in-stock Chips Candy Soda 1.75 1.25 1.00 5 1 nter a number of quarters: For this lab, you will be creating a program that simulates a simple vending machine that sells chips, candy, and soda. Each of these snacks has a different price and will have a different amount in stock. When the program is running, the current contents of the vending machine wil be displayed to the user, and then a prompt to enter a number of quarters will appear. After the user enters a number, the amount of money they entered will appear in dollars and cents. For example, if the user entered 7 quarters, $1.75 would be displayed. Next, the user will be prompted to make a selection from the vending machine. If they have entered enough money and the snack is in-stock, the item will be dispensed, and the number in-stock will decrease by one. If the user entered more money than necessary to make the purchase, a message will be displayed indicated that the appropriate amount of change has been returned. See the sample run at the end for clarification

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

Students also viewed these Databases questions