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. Posted solutions are meant to be 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 complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.