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?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here