Sam works at a local entertainment venue The price for a con

Sam works at a local entertainment venue. The price for a concert ticket is $55.00. The price for a play $75.00.

Sam has developed an algorithm to determine ticket charge based on the event type. Use Sam’s algorithm to find the results based on different inputs made by the user.

Algorithm:

Get event type (1 = Concert; 2=Play) and store in etype.

Get number of tickets purchased and store in qty.

If (etype is equal to 1)

        pricePerTicket = 55.00.

Otherwise

        pricePerTicket=75.00.

Calculate the total cost using the formula:

     totalTicketCharge = pricePerTicket x qty.

Display totalTicketCharge.

Based on Sam’s algorithm, answer the following questions.

1.     If a user wishes to attend a concert and purchases three (3) tickets, how much is the pricePerTicket? What is the totalTicketCharge?

2.     If a user wishes to attend a play and purchases two (2) tickets, how         much is the pricePerTicket? What is the totalTicketCharge?

**** Answer questions

Solution

1) Price Per Ticket : $55.00

Total Ticket Charge :$165.00

2) Price Per Ticket : $75.00

Total Ticket Charge : $150.00

Sam works at a local entertainment venue. The price for a concert ticket is $55.00. The price for a play $75.00. Sam has developed an algorithm to determine tic

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site