Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please input/output needs to be the same as the sample interaction. Thank You . Please make it simple don't do anything advance, I'm a newbie

Please input/output needs to be the same as the sample interaction. Thank You . Please make it simple

don't do anything advance, I'm a newbie trying to learn.

image text in transcribedimage text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions