09 Jul PMCA Sunday 10:00 Practice -10.
Question:
Write a program for a movie theater using while loop. It will keep asking your age and display the ticket price, until you enter “quit”. It is free if you are less than 3 years old, otherwise if your age is less than 16 years old or over 65 years old the ticket is $10, otherwise the price is $15. When you quit the loop, it will show how many tickets have been sold and total dollar amount.
Sample: How old are you? 10 $10 How old are you? 2 Free How old are you? 50 $15 How old are you? 67 $10 How old are you? quit You sold 4 tickets today and total is $35
Sorry, the comment form is closed at this time.