Question: C++ A room has one door, two windows, and a built-in bookshelf and it needs to be painted. Suppose that one gallon of paint can

C++

A room has one door, two windows, and a built-in bookshelf and it needs to be painted. Suppose that one gallon of paint can paint 120 square feet.

Write the program that prompts the user to input the lengths and widths of the door, each window, the bookshelf; and the length, width, and height of the room (in feet). The program outputs the amount of paint needed to paint the walls of the room (no ceiling and floor).

OUTPUT:

**********************************************************************

Enter the length and width of the door: 6 3

Enter the length and width of the first window: 3 3

Enter the length and width of second window: 3 4

Enter the length and width of the bookshelf: 5 5

Enter the length, width, and height of the room: 15 15 12

The amount of paint needed to paint the room: 5.46667 gallons.

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!