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.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 15E: (Program) Write a program to simulate the rolling of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question

C++ Programming 

 

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):

  1. The length and width of the door
  2. The length and width of each window
  3. The length and width of the bookshelf
  4. The length, width, and height of the room
  5. The area that can be painted with one gallon of paint

The program outputs:

  1. 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"

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage