Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* * CODE IN C * * Your program calculates and prints the total charge for a selected package, the duration, and food ( based
CODE IN CYour program calculates and prints the total charge for a selected package, the duration, and food based on the number of people attending
tablePackagetableFirst Hourfor theeventminimumtableHourlyCostaftertheFirstHourtableMinimumnumberof gueststableMaximumnumberof gueststableCostperpersonforfoodfffdfddecaaabff
tableMaxircharginclucfoodan eve$$$$An event venue offers four packages for parties birthday parties, graduation parties, retirement parties, etc. It offers activities such as bowling, laser tag, ropes course, video games, and VR experiences. You are tasked with writing a program that calculates the cost for a selected package, number of people, and duration. Each package charges a minimum fee for the first hour, and an additional fee every hour in excess of the first hour. The maximum duration possible for reserving an event is hours. There is a maximum charge for an event. There is a minimum number of guests and a maximum number of guests for each package. The package covers all the activities except food. Food is separate cost, on a per person basis. Your program calculates and prints the total charge for a selected package, the duration, and food based on the number of people attending PackageFirst Hour for the event minimumHourly Cost after the First HourMinimum number of guestsMaximum number of guestsCost per person for foodMaximum charge including food for an event#$$$$#$$$$#$$$$ RequirementsName your program projectcostcThe user enters the package selection, enter the number of hours, and number of guests. The program calculates and prints the charge.Your program should validate the package selection. If the selection is not in the range of to print the message "Invalid selection." and exit the program.Your program should validate the hours rented. If the number entered is less than or great than print the message "Invalid hours." and exit the program.Your program should validate the number of guests. If the number of guests entered is less than the minimum number of guests or greater than the maximum number of guests for the package selected, print the message "Invalid number of guests." and exit the program.Examples your program must follow this format preciselyExample #:Please select from three packages: and Enter package selection: Enter hours: Enter number of guests: Charge$: Example #:Please select from three packages: and Enter package selection: Enter hours: Enter number of guests: Charge$:
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