Question: Write a program to do the following: A movie theater patron can purchase a discounted ticket for G rated movies if they are

Write a program to do the following:
A movie theater patron can purchase a discounted ticket for "G" rated movies if they are children (12 or under) or seniors (65 and older).
Input the two pieces of data. Assume that the variable Age holds the age of the patron and the variable Rating holds the movie rating (G, PG, etc). Be sure they only enter a positive number for age and G, PG or R for rating.
Write the selection statements to output "Discount applies" when the 2 conditions are both true and "No Discount" if they are not both true.
Test your program 4 times:
Age 66 and G rated movie
Age 12 and G rated movie
Age 10 and R rated movie
Age 10 and x rated movie
 Write a program to do the following: A movie theater patron

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!