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 a program that prompts the user to input (in feet): The length and width of the door The length and width of each window The length and width of the bookshelf The length, width, and height of the room The area that can be painted with one gallon of paint The program outputs: The amount of paint needed to paint the walls of the room.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
C++
Instructions
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 a program that prompts the user to input (in feet):
- The length and width of the door
- The length and width of each window
- The length and width of the bookshelf
- The length, width, and height of the room
- The area that can be painted with one gallon of paint
The program outputs:
- The amount of paint needed to paint the walls of the room.
If I input "14" "5" "10" '10.5" "15 3.72" '15.23" "11.243" "92.77" "103.4" '21.5" "199.54"
The output should be "40.259"
If I input "55" "32" "33" "77" "33" "22" "15" "2" "225" "240" "14" "20"
The output should be "398.15"
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images