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

Mathematical/Sequential Programming Ticket Vending MachineTo purchase tickets a customer inserts money into a vending machine. The vending machinesupplies as many tickets that can be purchased (2) with the money entered (1) and returnsthe change (3). Each ticket costs 1.50.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 (1). Number of tickets purchased is (2). Amount of change returned is (3).For example, a customer entering 10 would generate the following output:Amount 10.00. Number of tickets purchased is 6. Amount of change returned is 1.00.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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!