Paint Problem

Line: Input Line
Medium Difficulty Input Sequence Selection Learning Outcome One Learning Outcome Three Exercise
Type: Exercise
You should have completed:

Youth Calculator

This topic leads to:

Paper Problem

Summary

A painter wants to know the amount of paint needed to paint the walls and ceiling of a room. The
chosen paint covers 100 square feet per gallon. There are two rectangular windows. How many gallons of paint must be bought?

Task

  1. Create a program to solve this problem.
  2. Test this problem with the following data: The room is 12 feet long, 10 feet wide and 8 feet tall. The two windows are 5 by 3 feet, and 6 by 2 feet, respectively.

Questions

  1. Can you modify the program for the general case of a rectangular room with any number of windows - Assuming the user is able to enter the room dimensions and the size of each window?