Question: Develop a program working as a soda vending machine. The program should show the product menu with price and take user input for product number
Develop a program working as a soda vending machine. The program should show the product menu with price and take user input for product number quantity and pay amount. The output should show the total sales price and going tax and the change.

Planning Planning Program IPO Function Flow Charts takePurchase Input Process (price) Output 1. Product Number showMenu 2. Product Quantity 1. Show menu 1. Total Purcanse 2. Calculate purchase 2. Tax (6% of Total . Payment Amount 3. Take payment Purcanse ) Prompt for quantity 4. Calculate tax 3. Change Show menu: Calculate Total Coke $1.25 purchase 2. Pepsi $1.00 6. Calculate Change 3. V r $2.00 Coffee $1,50 Save quantity 5. Exit Menu Return price Return (price ' quantity) Planning Sample outputs Function Flow Charts (Continued) splayinto (purchase, payment) ixxx Vending Machine XXXX takePayment Vending Machine Calculate tax (6% of purchase Exit Menu 3: Exit Menu Prompt for payment Enter your Choice:2 amount How muchis your payment?2 How muchis your payment?10 Calculate total purchase (purchase+ Calculated tax Save payment Tax Amount : $0.075 Tax Amount : $0.12 amount Total Purchase :$1.325 Total Purchase :$2.12 change : $7.68 Calculate change change : $0.675 (payment -total purchase) Return (payment) Display calculated values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
