Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Help C++ assignment Single Passenger Fare with no checked in baggage Adult Passenger (age 14-64) $147.30 Senior Passenger (age 65+) $13115 Child Passenger (under
Please Help C++ assignment
Single Passenger Fare with no checked in baggage Adult Passenger (age 14-64) $147.30 Senior Passenger (age 65+) $13115 Child Passenger (under 14) $110.25 Infant Passenger (under 2) $0.00 Family X is going for a vacation from Portland to Las Vegas. The one way ticket fare is given above. Write a program to calculate the one way airfare including baggage cost for family X. 1) Remember, the program allows only adults, 18 or older to purchase tickets. Use if statement to verify the purchaser age. 2) Next ask if the user want to purchase ticket or not. Use switch. If yes, continue to step 3, otherwise end the program 3) 4) Baggage Cost: The cost of baggage is zero, if there are no checked in baggage. The 5) The program will output the total purchase price - Total one way fare of all 6) The output should be formatted to two decimal places The user may input any number of adults, seniors, children, infants and bags. cost of first baggage is S20 for each bag. The cost of second bag is S35 for each bag. passenger + Total baggage costStep 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