Question: Write a Java program that determines the change to be dispensed from a vending machine. An item in the machine can be less than or

Write a Java program that determines the change to be dispensed from a vending machine. An item in the machine can be less than or equal to 100.
Assume the following:
Assume we have N number of coins, in this case 4 coins:
coin1| Bitcoin is worth 75 cents
coin2| Doge is worth 38 cents
coin3| Etherium is worth 12 cents
coin4| Penny is worth 1 cent
For example, a possible dialogue with the user might be:
Input (Your input must match the following below):
Enter the price of the item in cents (less than or equal to 100) I will give you back the change:
The price of the item is:
45
Output (Your output must match the following below):
Your change is:
55
Bitcoin: 0
Doge: 1
Etherium: 1
Penny: 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!