An algorithm is required to calculate amount of paint required in gallons to paint a room excluding window, door and floor areas. Different paint brands have different coverage rate. Brand having code...

1 answer below »
An algorithm is required to calculate amount of paint required in gallons to paint a room excluding window, door and floor areas. Different paint brands have different coverage rate. Brand having code 1 has coverage 100 square feet per gallon, Brand 2 has 150 sq ft/gallon, 3 has 200 sq ft/gallon, 4 has 225 sq ft/gallon, 5 has 250 sq ft/gallon. Assume that the room will always have one door and one window. The algorithm should take paint brand code, length, width, and height of the room in feet from the user. It should also take the length and width of door and window in feet. The algorithm should display the paint required in gallons to paint a room

Income tax is to be levied in stages on taxable income. On the first $4461.99 you pay no tax, from $4462.00 to $17893.99 you pay 30 cents for each $ in excess of $4462, from $17894.00 to $29499.99 you pay $4119 plus 35 cents for each $ in excess of $17894.00, from $29500 to $45787.99 you pay $8656 plus 46 cents for each $ in excess of $29500.00; for income above $45787.99 you pay $11179.00 plus 60 cents for each $ in excess of 45788.00. Write a program to read in a taxable income and compute and print tax payable to the nearest cent.


Document Preview:

Basics of Programming Week 9 In the last lecture we covered Selection control construct CASE Structure Exercise An algorithm is required to calculate amount of paint required in gallons to paint a room excluding window, door and floor areas. Different paint brands have different coverage rate. Brand having code 1 has coverage 100 square feet per gallon, Brand 2 has 150 sq ft/gallon, 3 has 200 sq ft/gallon, 4 has 225 sq ft/gallon, 5 has 250 sq ft/gallon. Assume that the room will always have one door and one window. The algorithm should take paint brand code, length, width, and height of the room in feet from the user. It should also take the length and width of door and window in feet. The algorithm should display the paint required in gallons to paint a room. Exercise Income tax is to be levied in stages on taxable income. On the first $4461.99 you pay no tax, from $4462.00 to $17893.99 you pay 30 cents for each $ in excess of $4462, from $17894.00 to $29499.99 you pay $4119 plus 35 cents for each $ in excess of $17894.00, from $29500 to $45787.99 you pay $8656 plus 46 cents for each $ in excess of $29500.00; for income above $45787.99 you pay $11179.00 plus 60 cents for each $ in excess of 45788.00. Write a program to read in a taxable income and compute and print tax payable to the nearest cent. Any Question?



Answered Same DayDec 31, 2021

Answer To: An algorithm is required to calculate amount of paint required in gallons to paint a room excluding...

Robert answered on Dec 31 2021
114 Votes
Inputs
Lr,wr,hr,ld,wd,lw,ww
Paint_code
1. calculate amount of paint required in gallons to pa
int a room
Let
Length of room = lr feet
Width of room = wr feet
Height of room = hr feet
Length of door = ld feet
Width of door = wd feet
Length of window = lw feet
Width of window = ww feet
Paint brand code square feet per gallon
1 100
2 150
3 200
4 225
5 250

Area of room to be paint Area of two side walls +Area of front and back wall +
Area of top – Area of window – Area of door
Area of the room to be paint = 2(lr×hr) + 2(wr×hr) + (lr×wr) – (ld×wd) + (lw×ww)...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here