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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago