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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education