Question: Directions: Write a program that calculates the occupancy rate for a hotel. This program will exercise the use of loops in a program. This should

Directions: Write a program that calculates the occupancy rate for a hotel. This program will exercise the use of loops in a program. This should be a review of topics from chapters 4 and 5. This assignment is to help students recall concepts learned in the previous course. You will be graded on program styles and structure, and execution of basic skills such as implementing loops.The program should start with a welcome message that gives the program name and a brief description of what the program does. (2 points)Next, begin by asking the user how many floors the hotel has and store the user's input. (2 points) A loop should then iterate once for each floor. In each iteration, the loop should: (6 points)ask the user for the number of rooms on the floor, ask the user for how many of the rooms are occupied, keep a running total of the number of total rooms and the number of occupied rooms.After all the iterations, the program should display: (8 points)how many total rooms the hotel has,how many of them are occupied,how many are unoccupied,and the percentage of rooms that are occupied. (The percentage may be calculated by dividing the number of rooms occupied by the number of rooms.)This program must include loops. The displayed output should be well-spaced, readable and easy to follow. (2 points)This assignment should be completed in a C++ compiler. Once complete, please save and submit the .cpp file on Canvas.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!