Write the code for a question in C++, homework help

Write the code for a question in C++, homework help

Write a C++ program that reads from the console the dimensions (length, width, and height) of a room in feet, computes the total area of the four walls and ceiling, and determines the amount of primer and paint in gallons necessary to cover them (but not the floor!)

Declare and use constants to represent the fact that one gallon of primer will coat 200 square feet and one gallon of paint will cover 350 square feet. Output your results using fixed-point notation with a precision of two decimal places. 

The following illustrates a sample run with user input shown in bold:

Enter the length, width, and height of the room in feet: 12.5 14 8.9 [Enter] 

The total area of the painting surfaces is 646.70 square feet.

The total amount of primer needed is 3.23 gallons.

The total amount of paint needed is 1.85 gallons 

Programming Style

Make use of all elements of good programming style, including:

  • Comments, placing them liberally throughout your code to document it.

  • Proper indentation and instruction grouping (see course text for examples).

  • Declarative names for variables and constants.

     

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper