Posted on

Write a program that determines the total amount for a set of tickets based off the following

Write a program that determines the total amount for a set of tickets based on the following prices. Create a function that accepts the class type (as its letter) and the number of tickets of that class. The function should return the total price for that number of tickets. The main function should ask the user for the number of tickets of each type that was purchased and then call the function for each ticket type to calculate the subtotal of each type. The total price should be outputted in the main function.

Write a program that determines the total amount for a set of tickets based on the following prices. Create a function that accepts the class type (as its letter) and the number of tickets of that class. The function should return the total price for that number of tickets. The main function should ask the user for the number of tickets of each type that was purchased and then call the function for each ticket type to calculate the subtotal of each type. The total price should be outputted in the main function.


 
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

 
Instant
Download

Student review: (3 ratings) 3 out of 3 people found this solution helpful.