Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started