Question: roblem 3 . Change Winte a program that has the class name Change and lias the main method. The program should determine the cliange that
roblem Change
Winte a program that has the class name Change and lias the main method.
The program should determine the cliange that should be dispensed from a vending
machine using the smallest number of nickels, dimes and quarters possible and should
prompt the user to enter the item cost.
An item in the machine can cost between cents and a dollar and the price can only be
a multiple of ie the cost must end in the value or from cents up to cents.
The machine accepts only a single dollar bill to pay for the item.
Do not worry about the cases when the user enters an invalid amount or an item cost of
Several sample runs are provided for you below. Format your output to match the sampl
ourput. Nore that your code should work for any value and these are just samples you
cannot hardcode your values in your code
Enter item cost in
zents:
Enter item cost in
Enter item cost in
cents:
cents:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
