> Pseudocode?

Pseudocode?

Posted at: 2014-12-18 
1. ask for the number of floors in the hotel.

Remove the excess words and use the keyword that your textbook or handouts show in examples.

floors = INPUT ("Enter the number of floors: ")

2a. use a while loop to make sure the number of floor is greater than or equal to one.

WHILE floors < 1:

2b. Display an error message and get a new input when the number of floor is less than 1.

--- PRINT "I've never heard of a hotel like that, re-enter:

--- floors = INPUT ("Enter the number of floors: ")

ENDWHILE

Hotel occupancy:

a hotel's occupancy rate is calculated as follows:

occupancy rate = number of rooms occupied / total number of rooms

Write a program that calculates the occupancy rate for each floor of the hotel and the entire hotel.

The program should:

1. ask for the number of floors in the hotel.

2. use a while loop to make sure the number of floor is greater than or equal to one. Display an error message and get a new input when the number of floor is less than 1.

3. Use another loop to iterate once for each floor. During each iteration, the loop should ask the user for the number of rooms on the floor and the number of rooms that are occupied on that floor. Then the loop calculate and display the occupancy rate for that floor using the formula above.

4. calculate and display the occupancy rate for the whole hotel