The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows. If the number of rooms booked is: at least 10, the discount is 10% at least 20, the discount is 20% at least 30, the discount is 30% Also if rooms are booked for at least three days, then there is an additional 5% discount.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 2PP: (Mechanics) The deflection at any point along the centerline of a cantilevered beam, such as the one...
icon
Related questions
icon
Concept explainers
Question

Summary

The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows.

If the number of rooms booked is:

  • at least 10, the discount is 10%
  • at least 20, the discount is 20%
  • at least 30, the discount is 30%

Also if rooms are booked for at least three days, then there is an additional 5% discount.

Instructions

Write a program that prompts the user to enter:

  1. The cost of renting one room
  2. The number of rooms booked
  3. The number of days the rooms are booked
  4. The sales tax (as a percent).

The program outputs:

  1. The cost of renting one room
  2. The discount on each room as a percent
  3. The number of rooms booked
  4. The number of days the rooms are booked
  5. The total cost of the rooms
  6. The sales tax
  7. The total billing amount.

Your program must use appropriate named constants to store special values such as various discounts.

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr