Joe is a carpenter, whose main source of income is putting vinyl floors, as well as molding around the floor. When a customer wants to put flooring in a specific room and contacts Joe for an estimate, Joe begins by measuring the length and width of the room. Then, he finds out the current unit cost of vinyl (per square foot) and the unit cost of molding (per foot). Once he gets this data, he calculates the total cost of required materials, using the following formulas:
area = length × width
perimeter = 2 × (length + width)
total-cost-of-vinyl = area × unit-cost-of-vinyl
total-cost-of-molding = perimeter × unit-cost-of-molding
cost-of-materials = total-cost-of-vinyl + total-cost-of-molding.
Your task is to help Joe by implementing a program for his calculations.
Implement a program that inputs the length and width of a room and computes the area and perimeter of the room.
Input and output:
Your program should first prompt the user to enter the room length, then prompt the user to enter the room width, and then output the results. We assume that the length and width are integers between 1 and 500 (measured in feet).