0% found this document useful (0 votes)
56 views1 page

Bulk Ticket Discount Calculation

The document outlines a program for calculating the total cost of theater tickets based on a discount scheme. Discounts are applied for bulk bookings over 20 tickets and for using a coupon card, with specific ticket prices for classes k and q. It also includes input validation for the number of tickets and ticket class, with specific error messages for invalid inputs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

Bulk Ticket Discount Calculation

The document outlines a program for calculating the total cost of theater tickets based on a discount scheme. Discounts are applied for bulk bookings over 20 tickets and for using a coupon card, with specific ticket prices for classes k and q. It also includes input validation for the number of tickets and ticket class, with specific error messages for invalid inputs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Problem Statement – In a theater, there is a discount scheme announced where one

gets a 10% discount on the total cost of tickets when there is a bulk booking of
more than 20 tickets, and a discount of 2% on the total cost of tickets if a
special coupon card is submitted. Develop a program to find the total cost as per
the scheme. The cost of the k class ticket is Rs.75 and q class is Rs.150.
Refreshments can also be opted by paying an additional of Rs. 50 per member.

Hint: k and q and You have to book minimum of 5 tickets and maximum of 40 at a
time. If fails display “Minimum of 5 and Maximum of 40 Tickets”. If circle is
given a value other than ‘k’ or ‘q’ the output should be “Invalid Input”.

The ticket cost should be printed exactly to two decimal places.

Sample Input 1:

Enter the no of ticket:35


Do you want refreshment:y
Do you have coupon code:y
Enter the circle:k
Sample Output 1:

Ticket cost:4065.25
Sample Input 2:

Enter the no of ticket:1


Sample Output 2:

Minimum of 5 and Maximum of 40 Tickets

You might also like