Write a program that calculates the occupancy rate

Assignment Help Computer Engineering
Reference no: EM132208506

Question :

Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has.

A loop should then iterate once for each floor. In 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 how many 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.

Reference no: EM132208506

Questions Cloud

Find the number of students having greater score : Find the average marks if the class and also find the number of students having greater score then average score of class.
Print the initial database of accounts : The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, balance inquiries, close accounts, etc..
Write a program that finds the area of a circle : Write a program called cirearea() that finds the area of a circle. It should take an argument of type float and return an argument of the same type.
Calculate statistical information on list of integer number : Return the double average and standard deviation via call by reference parameters. The function itself does not return anything.
Write a program that calculates the occupancy rate : Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has.
Calculate the balance of a savings account at the end : Write a program that calculates the balance of a savings account at the end of a period of time.
Simulate a coin toss and determines if it is realistic : Prompt the user to enter the number of times the coins should be tossed. The coin should be tossed at least 10 times.
Calculate and print the sum of the first 100 even numbers : Write a program to calculate and print the sum of the first 100 even numbers. Hint: You need a running sum.
Display the contents of the first array : Write a program in C that uses two identical arrays of just eight intergers. Display the contents of the first array, then call a function to sort.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Compute analysis of turbulent momentum flow

Compute analysis of the turbulent momentum flow in a circular tube with constant properties: Use a mixing-length turbulence model with the Van Driest damping.

  How will replacing the air in the gap by argon

Consider a double-pane window whose air space is flashed and filled with argon gas. How will replacing the air in the gap by argon affect (a) convection.

  Draw an example red-black tree that is not an AVL tree

Draw an example red-black tree that is not an AVL tree. Consider a tree T storing 100,000 entries. What is the worstcase height of T in the following cases?

  Create an instance of the fridge class

Creates an instance of the Fridge class . Calls the checkTemp method and catches the TemperatureTooLow Exception.

  The difference between a rectangular array and a polar array

What is the difference between a rectangular array and a polar array. What inputs are required to execute each command in AutoCAD

  Questioncreate your own repeat-until repetition arrangement

questioncreate your own repeat-until repetition arrangement. you decide theme. you have to provide both pseudocode and

  Write a java program that prompts the user for input

The first line of the input file will indicate the number of times the program will prompt the user for input (n).

  Write a function that takes a positive integer

In either case, you may not use your book or your notes. The directions of the previous part of the final exam holds.

  Demonstrate your achievement of these goals

SIT 384 Data Analytics for Cyber Security - explain each step of the procedure of classification, and the performance results for your classifiers.

  What is the average workload needed for finding a collision

Consider a hash function that outputs 50 bit long hash values. What is the average workload needed for finding second-preimage with this hash function? Similarly, what is the average workload needed for finding a collision? Express the attack aver..

  Discuss the challenges of maintaining information security

Discuss the challenges of maintaining information security at a remote recovery location. I recommend your initial posting to be between 200-to-300 words.

  Write review about article - two-factor authentication

Write review about this article with references -In our world today, one cannot deny the impact that the Internet has on all aspects of our society and security

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd