Write a program that calculates the occupancy rate of the 120 suites (20 per flo
ID: 3658068 • Letter: W
Question
Write a program that calculates the occupancy rate of the 120 suites (20 per floor) located on the top 6 floors of a 15-story luxury hotel. These floors are 10-12 and 14-16 because, like many hotels, there is no 13th floor. Solve the problem by using a single loop that loops 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. Note that when it is on the iteration for floor 13, no input should be taken. 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. Using scanf, printf, return...Explanation / Answer
Try dis n let me knw.... #include #include int main() { clrscr(); int floors = 6, rooms = 20, suites = 120, occupied = 0, totalRooms = 120, totalOccupied = 0, totalUnoccupied = 0, numFloors=16; int occupRate; //store hotel occupancy rate for (int floor = 10; floorRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.