subject
Computers and Technology, 28.01.2020 17:42 MQV2000

Write a program that calculates the occupancy rate for each floor of a hotel. the program should start by asking for the number of floors the hotel has. a loop should then iterate once for each floor. during each iteration, the loop should ask the user for the number of rooms on the floor, and how many of them are occupied. after all the iterations, the program should display the number of rooms the hotel has, the number that are occupied, the number that are vacant, and the occupancy rate for the hotel. input validation: do not accept a value less than 1 for the number of floors. do not accept a number less than 10 for the number of rooms on a floor.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
To display data in a certain manner like alphabetical order is called
Answers: 1
question
Computers and Technology, 22.06.2019 05:20
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b.c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
You know the right answer?
Write a program that calculates the occupancy rate for each floor of a hotel. the program should sta...
Questions
Questions on the website: 13722360