Question
Write a program to calculate the total cost to enter into a waterpark for a family/group in C++ Ticket rates are listed below kids (Age
Write a program to calculate the total cost to enter into a waterpark for a family/group in C++
Ticket rates are listed below
kids (Age 12 and under)=$ 12.50
Regular( Age between12 -55) =$ 18.25
Seniors (55 and above) = $15.00
Tax = 8 %
Your program should ask the user to enter the total number of members in their group.
User needs to enter the ages for all members
Based on the age it has to calculate and add the cost of each member and display the total cost including tax.
Your program should display the number of tickets for each type and the total cost for the group
After display your program should repeat the process until the user wants to stop.
Write appropriate error messages for invalid entries.
Your program must use
- do while loop
- Global Constant variable
- At least one value returning function
- At least one void function
- For Loop
Please drop the code and the screenshot of your output
Sample run of the program:
Welcome to our WATERPARK!!!
Please enter the number of members in your group. 7
Please enter the ages for each person in your group. 15 28 11 34 26 60 58
Please pay the total of $115.50 + 8% tax = $ 124.74
And pick up
1 Kid ticket
4 Regular tickets and
2 Senior tickets
Is there another Group? Type Y or N y
Welcome to our WATERPARK!!!
Please enter the number of members in your group. 4
Please enter the ages for each person in your group. 10 28 21 5
Please pay the total of $61.50 + 8% tax = $ 66.42
And pick up
2 Kids tickets
2 Regular tickets and
0 Senior tickets
Is there another Group? Type Y or N n
BYE All Done!
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