Question
Create a flow chart, HIPO chart or Pseudocode for the following problem (USING C++)-- Most Importantly, find the Algorithm! Write the algorithm that determines the
Create a flow chart, HIPO chart or Pseudocode for the following problem (USING C++)-- Most Importantly, find the Algorithm!
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)
1) Write down the Inputs, Outputs and Processing
2) Create a Flowchart, Hippo Chart or Pseudocode of your Algorithm--- Include a variable list
( Overall, I'm more concerned about the algorithm/calculation itself)-- Using C++ of course
"Sample" INPUT & OUTPUT
(Note: we only need to include text in input & output that will be different from one execution to the next)
Enter price of item (from 5 cents to a dollar, in 5-cent increments): 45
You bought an item for 45 cents and gave me a dollar. Your total change is 55 cents.
DISPENSING...
2 Quarter(s)
0 Dime(s), and
1 nickel(s)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started