Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

Students also viewed these Databases questions

Question

5. Identify three characteristics of the dialectical approach.

Answered: 1 week ago

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago