Homework #2

Write out these programs on paper, include comments that describe what the program does.

Program #1: (2.4.5) Ask for the length of the walls in feet, and then calculate the cost of the paint needed to paint the inside of a square room that is 8' tall if paint costs $15/gallon (you can purchase partial gallons in exactly the amount you need) and one gallon covers 350 square feet. (2.5.8) Express the cost rounded to the nearest dollar.

Program #2: (2.8.4) Given 3 int values, print the smallest number if all 3 numbers are in the range -10 to 0 inclusive, or print the largest number if they are all in the range 0 to 10 inclusive. Otherwise print "out of range"