Question: LANGUAGE: C++ COMPILER: Visual Studio You are working for a company that lays ceramic floor tile, and its employees need a program that estimates the
LANGUAGE: C++
COMPILER: Visual Studio
You are working for a company that lays ceramic floor tile, and its employees need a program that estimates the number of boxes of tiles need for a job. A job is estimated by taking the dimensions of each room in feet and inches, and converting those dimensions into a multiple of the tile size (rounding up any partial multiple) before multiplying to get the number of tiles for the room. A box contains 20 tiles, so the total number needed should be divided by 20 and rounded up to get the number of boxes. The tiles are assumed to be square. The program should initially prompt the user for the size of the tiles in inches and the number of rooms to be covered with tile. It should then input the dimensions for each room in feet and inches. After the dimensions for each room have been input then calculate and output the number of tiles needed for each room, the total number of tiles needed for all rooms, the number of boxes of tiles needed, and how many extra tiles will be left over. You should create a function called TilesInRoom that will take the size of one tile, and the width and length of a room and return the number of tiles it will take to cover that room. The number of tiles should be rounded up to the nearest whole number. Here is an example of how a run might appear: Enter the number of rooms in the job: 2 Enter the size of each tile in inches: 12 Enter room 1 width (feet and inches, separated by a space): 17 4 Enter room 1 length (feet and inches, separated by a space): 9 3 Room 1 requires 161 tiles. Enter room 2 width (feet and inches, separated by a space): 11 6 Enter room 2 length (feet and inches, separated by a space): 11 9 Room 2 requires 136 tiles. The 2 rooms in this job will require 297 tiles. The number of boxes of tiles needed is 15. There will be 3 extra tiles left over.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
