Question: Mathematical / Sequential Programming Ticket Vending MachineTo purchase tickets a customer inserts money into a vending machine. The vending machinesupplies as many tickets that can
MathematicalSequential Programming Ticket Vending MachineTo purchase tickets a customer inserts money into a vending machine. The vending machinesupplies as many tickets that can be purchased with the money entered and returnsthe change Each ticket costs Design a program that prompts the user to enter an amount of money, then calculate thenumber of tickets purchased and the amount of change. Output the following string:Amount Number of tickets purchased is Amount of change returned is For example, a customer entering would generate the following output:Amount Number of tickets purchased is Amount of change returned is Make sure you identify and declare all required variables with appropriate types and initializeany variables that need initializing. Also think about extreme cases and potential errors.You should make use of appropriate library functions where appropriate to perform yourcalculations and format your output.Creat a flowgorithm
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
