Question: Write the algorithm that determines the change to be dispensed from a vending machine. An item in the machine can cost between 5 cents and
Write the algorithm that determines the change to be dispensed from a vending machine. An item in the machine can cost between 5 cents and 1 dollar, in 5-cent increments (5,10,15,......90, 95, or 100), and the machine accepts only a single dollar bill to pay for the item. The user will provide the price and the program will output the price and calculate and output the total change and how many quarters, dimes and nickels need to be dispensed. DO NOT USE REPETITION OR SELECTION STATEMENTS TO SOLVE THIS--- You must use Div & Mod! (Division and Modulo)---- ( C++ )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
