Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

Students also viewed these Databases questions