Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write c++ Immersive Reader Assignment Write a program that calculates the ticket cost of a group coming to BAU ClubFest2021. The program will read three
write c++
Immersive Reader Assignment 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 (.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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started