Question: using c++ Write a program that calculates the ticket cost of a group coming to BAU ClubFest2021. The program will read three inputs in the

using c++ using c++ Write a program that calculates the ticket cost of a

Write a program that calculates the ticket cost of a group coming to BAU ClubFest2021. The program will read three inputs in the following order: type of the group as a char (groupType), institution of the group as a char (groupInst), and number of people in the group as an int (groupNbr). The type of the group can be ONLY one of the three following things: U': Undergraduate student 'G': Graduate student 'H: High-school student Institution of the group will be A SINGLE CAPITAL LETTER representing the university name or high-school name (e.g., 'B' for BAU student, 'M' for Marmara University student, etc..). Since this is a Baheehir event if the groupinst is 'B', then the cost of entrance is free (i.e., 0) whether they are high-school, undergraduate, or graduate students. Other than that, we do not accept any high-school students to the ClubFest. So, if the groupType is 'H' and the groupinst is NOT 'B' then the program will say "No admittance". Otherwise, the cost of entrance is 12 per person in the group if the groupType is 'U' and 22 per person if the groupType is 'G'. If admitted, the program will print out the ticket cost of the group as an int value. input UA3 HB8 HC 11 Output 36 0 No admittance

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!