ProgrammingAssignment3 Project Goals Please Code using C The goal of this project is to: Familiarize students with functions Provide students with continued practice with expressions and selection. Important Notes: Formatting: Make sure that you follow the precise  recommendations for the output content and formatting. For your testing  purposes, the autograder will be comparing your output to that of the  example executable. Comments: Header comments are required on all files  and recommended for the rest of the program. Points will be deducted if  no header comments are included. Filename: Save your program as hotels.c Program Hope you enjoyed your stay! We’re going to create a reservation making system to incorporate discounts for longer stays. We’ll be getting the customer’s number of nights and we’ll also be  getting the type of the room, which should be one of the following  letters: D, Q, or K (for Double, Queen, or King). We’ll do that for two  reservations. To be able to advise the user on which reservation they should  choose, we’re going to have to make some calculations. First we’ll need  to determine the price per night. Double rooms go for $59.99 per night,  Queen rooms are $69.99 per night, and King rooms are $79.99 per night. Then we’ll need to determine the discount. For every night over 2, a  15% discount should be applied. For example, if the stay is for 4  nights, then a 30% discount would be applied to the overall price. Finally, we need to let the user know which stay is the cheapest or if they’re the same cost. Input: The user should be prompted for a set of two values which represent  the number of nights and the room type for the first reservation. The  number of nights should be a whole number. The room type should be a  single letter. The user should enter both values on one line, separated  by spaces. The user should then be prompted for the remaining  reservation. Example (the highlighted part is what the program displays and the italicized part is the user input): Reservation 1 (#nights type): 3 D The example executable: An example executable is provided in this repository. You should be able to run it from your project folder. If you encounter a “permission denied” error when attempting to run the executable, type chmod u+x hotelsExecutable into the terminal and try running the executable again. Requirements main() Functionality: The main function should prompt the user  for two reservations. The room rate for each room for each reservation  must be determined. Then the reservation total for each reservation can  be calculated. A message should be displayed advising the user on which  reservation is the better deal. In addition to the main functions, your program should have 2 more functions: getRoomRate() Input Parameters: room type Returned Output: room rate Functionality: Given the type of room, this function should return the appropriate room rate. calcReservation() Input Parameters: room rate, number of nights Returned Output: total reservation price Functionality: Given the room rate and number of  nights, this function should return the total reservation price with any  applicable discount applied.

ProgrammingAssignment3
Project Goals
Please Code using C
The goal of this project is to:

Familiarize students with functions
Provide students with continued practice with expressions and selection.

Important Notes:

Formatting: Make sure that you follow the precise  recommendations for the output content and formatting. For your testing  purposes, the autograder will be comparing your output to that of the  example executable.
Comments: Header comments are required on all files  and recommended for the rest of the program. Points will be deducted if  no header comments are included.
Filename: Save your program as hotels.c

Program
Hope you enjoyed your stay!
We’re going to create a reservation making system to incorporate discounts for longer stays.
We’ll be getting the customer’s number of nights and we’ll also be  getting the type of the room, which should be one of the following  letters: D, Q, or K (for Double, Queen, or King). We’ll do that for two  reservations.
To be able to advise the user on which reservation they should  choose, we’re going to have to make some calculations. First we’ll need  to determine the price per night. Double rooms go for $59.99 per night,  Queen rooms are $69.99 per night, and King rooms are $79.99 per night.
Then we’ll need to determine the discount. For every night over 2, a  15% discount should be applied. For example, if the stay is for 4  nights, then a 30% discount would be applied to the overall price.
Finally, we need to let the user know which stay is the cheapest or if they’re the same cost.
Input:
The user should be prompted for a set of two values which represent  the number of nights and the room type for the first reservation. The  number of nights should be a whole number. The room type should be a  single letter. The user should enter both values on one line, separated  by spaces. The user should then be prompted for the remaining  reservation.
Example (the highlighted part is what the program displays and the italicized part is the user input): Reservation 1 (#nights type): 3 D
The example executable:
An example executable is provided in this repository. You should be able to run it from your project folder. If you encounter a “permission denied” error when attempting to run the executable, type chmod u+x hotelsExecutable into the terminal and try running the executable again.
Requirements
main()

Functionality: The main function should prompt the user  for two reservations. The room rate for each room for each reservation  must be determined. Then the reservation total for each reservation can  be calculated. A message should be displayed advising the user on which  reservation is the better deal.
In addition to the main functions, your program should have 2 more functions:
getRoomRate()

Input Parameters: room type

Returned Output: room rate

Functionality: Given the type of room, this function should return the appropriate room rate.
calcReservation()

Input Parameters: room rate, number of nights

Returned Output: total reservation price

Functionality: Given the room rate and number of  nights, this function should return the total reservation price with any  applicable discount applied.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code HAPPY