Question: Need help with this problem. Thank You! Please keep it as simple as possible, A room needs to be painted. The room has one door,

Need help with this problem. Thank You! Please keep it as simple as possible,

Need help with this problem. Thank You! Please keep it as simple

as possible, A room needs to be painted. The room has one

A room needs to be painted. The room has one door, two windows, and a built-in bookshelf. Only the walls of the room are to be painted. Write a program that prompts the user to input the width and heights of the door, each window, and the bookshelf (in inches) the length, width, and height of the room (in feet), and the area that can be painted with one gallon of paint (in square feet). The program outputs the minimum number of gallons of paint that must be purchased to paint the wall (excluding the window, of course!). Paint can only be purchased in 1 gallon containers. Include only the header. Input Specification All dimensions are non-negative. Door, window, and bookshelf dimensions are in inches. Room length, width, and height dimensions are in feet. The area that can be painted with one gallon of paint is in square feet. Output Specification Output the total area to paint, the number of gallons of paint required, and the minimum whole number of gallons of paint to buy. Use the formatting shown in the Sample Interaction below. Your program's output should terminate with one blank line. Sample Interaction $ clang++ -std=C++14 -Weverything pa02.cpp $ ./a.out This program computes gallons of paint required to paint a room. Enter DOOR width and height (in), separated by a space: 36 80 Enter WINDOW 1 width and height (in), separated by a space: 24 60 Enter WINDOW 2 width and height (in), separated by a space: 36 60 Enter BOOKSHELF width and height (in), separated by a space: 48 96 Enter ROOM width, length, and height (ft), separated by spaces: 13.85 14 10 Enter area covered by one gallon of paint (sq ft): 120 Total area to paint (sq ft): 480 Total paint required (gals): 4 Minimum paint to buy (gals): 4 $ ./a.out This program computes gallons of paint required to paint a room. Enter DOOR width and height (in), separated by a space: 36 80 Enter WINDOW 1 width and height (in), separated by a space: 24 60 Enter WINDOW 2 width and height (in), separated by a space: 36 60 Enter BOOKSHELF width and height (in), separated by a space: 48 96 Enter ROOM width, length, and height (ft), separated by spaces: 13.85 14 10 Enter area covered by one gallon of paint (sq ft): 110 Total area to paint (sq ft): 480 Total paint required (gals): 4.36364 Minimum paint to buy (gals): 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!