Question: C++ Write a program that calculates the occupancy rate of the 120 suites (20 per floor) located on the top six floors of a 15-story
C++
Write a program that calculates the occupancy rate of the 120 suites (20 per floor) located on the top six floors of a 15-story luxury hotel. These are floors 10-12 and 14-16 because, like many hotels, there is no 13th floor. Solve the problem by using a single loop that iterates once for each floor between 10 and 16 and, on each iteration, asks the user to input the number of suites occupied on that floor. Use a nested loop to validate that the value entered is between 0 and 20 (inclusive). After all the iterations, the program should display how many suites the hotel has, how many of them are occupied, and what percentage of them are occupied.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
