Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Choosing Your Topic Researching the Topic

Answered: 1 week ago

Question

The Power of Public Speaking Clarifying the

Answered: 1 week ago