Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* * CODE IN C * * An event venue offers four packages for parties ( birthday parties, graduation parties, retirement parties, etc. ) .

**CODE IN C**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 4 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 (minimum)Hourly Cost after the First HourMinimum number of guestsMaximum number of guestsCost per person for foodMaximum charge (including food) for an event#1$150$100520$25$595#2$180$120830$22$850#3$200$1501040$20$1050 RequirementsName your program project1_cost.cThe 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 1 to 3, print the message "Invalid selection." and exit the program.Your program should validate the hours rented. If the number entered is less than 1 or great than 4, 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 precisely)Example #1:Please select from three packages: 1,2, and 3Enter package selection: 1Enter hours: 3Enter number of guests: 20Charge($): 595 Example #2:Please select from three packages: 1,2, and 3Enter package selection: 2Enter hours: 4Enter number of guests: 10Charge($): 760

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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions