A vending machine sells coffee for 25 cents or tea for 15 cents. Write a program that will simulate this vending machine. First, accept coins from the user (user enters integers 5, 10, or 25), until the user enters zero. Then give the user a choice (with menu) for coffee or tea. If the amount deposited is sufficient, print the selection and calculate the change. If the amount deposited is not sufficient, display a message for insufficient amount and return the money.

A sample input/output:

Insert coins: 10
Insert coins: 10
Insert coins: 10
Insert coins: 0
Please select from the following menu: 1 – coffee, 2 - tea
Enter your choice: 1
Coffee dispensing
Your change is 5 cents
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.