Question: A rectangular wall has length L and height H. We wish to paint the wall and would like to know how much paint to buy.

A rectangular wall has length L and height H. We wish to paint the wall and would like to know how much paint to buy. Given the wall dimensions, we need to know how many windows and doors there are in the wall so that we can calculate the painted area, how much paint, to buy, and the total cost of the purchase. Assume that each door has an area of 20 ft^2, each window has an area of 15 ft^2, one gallon of paint covers 350 ft^2, and the minimum amount of paint that can be purchased is one gallon. Write a C program that performs the following tasks Prompt the user for the following information: Length of the wall in inches (to the nearest inch) Height, of the wall in inches (to the nearest inch) How many doors are in the wall How many windows are in the wall Price of a 1 gallon can of paint (to the nearest penny) Percent, sales tax to be included in the final price Calculate, and display on the screen, the total area of the wall to be painted (square inches) Calculate, and display on the screen, the total number of gallons to be purchased (gallons) Calculate, and display on the screen, the total of cans of paint to be purchased (number of cans) Calculate, and display on the screen, the total cost of the paint before sales tax (dollars) Calculate, and display on the screen, the total cost of the paint including sales tax (dollars)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
