plz solve this in C. don't copy other people's code. thanks You are in charge of planning a holiday party for your organization at a venue nearby, which meant that you have to organize the details including food and activities. After researching the possibilities, you have considered three packages.  Each package charges a minimum fee for the first hour of room rental, and an additional fee every hour in excess of the first hour. The maximum duration possible for reserving per day is 4 hours. There is a maximum charge for room rental for an event.   Write a program that calculates and prints the total charge for a selected package, the duration, and food and activities (based on the number of people attending). Package  First Hour of room rental (minimum)  Hourly Cost after the First Hour  Maximum room rental charge for an event  Minimum number of guests  Maximum number of guests  Cost per person for food and activities  #1  $50  $25  $95  50  200  $25  #2  $30  $15  $55  80  300  $22  #3  $20  $12  $40  30  150  $20  Requirements The user enters the package selection, enter the number of hours, and number of people. The program calculates and prints the charge. Follow the format of the examples below. Your program should validate the package selection. If the selection is not in the range of 1 to 3, print the message "Invalid selection. Select from 1 to 3." 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 input. Enter a positive number less than or equal to 4 for number of hours." and exit the program. Your program should validate the number of people. If the number of people entered is less than the minimum number of guests or greater than the room capacity for the package selected, print a message ("Not meeting minimum requirement for number of guests." or "Exceeded maximum 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 3  Enter package selection: 1  Enter hours: 3  Enter number of people: 200  Charge($): $5095  Example #2 Please select from three packages: 1, 2, and 3  Enter package selection: 2  Enter hours: 4  Enter number of people: 100  Charge($): $2255  Example #3 Please select from three packages: 1, 2, and 3  Enter package selection: 10 Invalid selection. Select from 1 to 3.

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter9: Getting Started With Javascript: Creating A Countdown Clock
Section9.3: Visual Overview: Javascript Functions And Expressions
Problem 2QC
icon
Related questions
Question

plz solve this in C. don't copy other people's code. thanks

You are in charge of planning a holiday party for your organization at a venue nearby, which meant that you have to organize the details including food and activities. After researching the possibilities, you have considered three packages. 

Each package charges a minimum fee for the first hour of room rental, and an additional fee every hour in excess of the first hour. The maximum duration possible for reserving per day is 4 hours. There is a maximum charge for room rental for an event.  

Write a program that calculates and prints the total charge for a selected package, the duration, and food and activities (based on the number of people attending).

Package 

First Hour of room rental (minimum) 

Hourly Cost after the First Hour 

Maximum room rental charge for an event 

Minimum number of guests 

Maximum number of guests 

Cost per person for food and activities 

#1 

$50 

$25 

$95 

50 

200 

$25 

#2 

$30 

$15 

$55 

80 

300 

$22 

#3 

$20 

$12 

$40 

30 

150 

$20 

Requirements

The user enters the package selection, enter the number of hours, and number of people. The program calculates and prints the charge. Follow the format of the examples below.

Your program should validate the package selection. If the selection is not in the range of 1 to 3, print the message "Invalid selection. Select from 1 to 3." 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 input. Enter a positive number less than or equal to 4 for number of hours." and exit the program.

Your program should validate the number of people. If the number of people entered is less than the minimum number of guests or greater than the room capacity for the package selected, print a message ("Not meeting minimum requirement for number of guests." or "Exceeded maximum 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 3 
Enter package selection: 1 
Enter hours: 3 
Enter number of people: 200 
Charge($): $5095 

Example #2

Please select from three packages: 1, 2, and 3 
Enter package selection: 2 
Enter hours: 4 
Enter number of people: 100 
Charge($): $2255 

Example #3

Please select from three packages: 1, 2, and 3 
Enter package selection: 10
Invalid selection. Select from 1 to 3.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 6 images

Blurred answer
Knowledge Booster
Single source shortest path
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning