C++ hotel occupancy program | Computer Science homework help



Write a program that calculates the occupancy rate for a hotel (Using basic C++ like forloops,ifelse,while, etc. NO functions/arrays)

The program should meet the following requirements:

Displays a title, and welcome message to the user.

Ask the user how many floors the hotel has (do not accept an answer less than 1).

For each floor, ask the user to enter the total number of rooms.

For each floor, ask the user if any rooms are currently occupied (the amount occupied should never surpass the total number of rooms on that floor). Allow the user to respond with only ‘Y’ or ’N’ (If the users anything other than these responses, display an error message and ask the user to respond accordingly. If the answer is ‘Y’, ask the user to enter the number of rooms that are currently occupied.

The program’s final output should contain:

1) The total number of rooms on each floor.

2) The number of rooms currently occupied on each floor.

3) The number of rooms currently unoccupied on each floor.

4) The floor’s occupancy rate (Number of rooms currently occupied divided by the total number of rooms)

A summary of the entire hotel that includes

1) The number of floors

2) The number of rooms occupied

3) The number of rooms unoccupied

4) The hotel’s occupancy rate (Number of rooms currently occupied divided by the total number of rooms in the hotel)

The output should resemble the following:


Hotel Occupancy Calculator


Welcome to the Hotel Occupancy Calculator. Our system will allow you to enter information for your hotel and see the occupancy rates in detail.

Floor        Rooms       Available       Occupied       Occupancy Rate


Floor 1      20                  5                           15                         75


Floor 2      12                    5                             7                      58.33 

Hotel Summary

Number of Rooms: 32 

Available Rooms: 10

Occupied Rooms: 22

Occupancy Rate: 68.75%


Calculate the price
Make an order in advance and get the best price
Pages (550 words)
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Finance/Acc Related
Good concept breakdown.
Customer 460073, July 9th, 2022
Home Repair & Home Maintenance
Well researched paper
Customer 463473, November 4th, 2022
Social Work and Human Services
Good work.
Customer 460073, June 23rd, 2022
Excellent response.
Customer 462281, April 20th, 2022
Thank you for your promptness
Customer 453627, January 23rd, 2020
Customer 463759, January 21st, 2023
Business and administrative studies
Avoid plagiarism.
Customer 459305, March 29th, 2022
Nice try.
Customer 452441, April 19th, 2022
Business and administrative studies
Customer 459467, May 1st, 2022
Good journal.
Customer 459947, May 10th, 2022
Excellent Paper
Customer 456821, December 6th, 2022
Nice. Be keen on instructions.
Customer 462787, April 1st, 2022
Customer reviews in total
Current satisfaction rate
3 pages
Average paper length
Customers referred by a friend
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat