Pair Programming - Carpet Company
The CSI Carpet Company needs a program to help calculate room dimensions. Some manufacturers sell carpet by the square foot, others by the square inch, and still others by square meters.
Write a COMPLETE C++ program that, given the room dimensions in feet, will calculate the area of a room in square feet, and then convert that area into square inches or square meters depending on the user’s input.
The program first asks for the room’s dimensions (length and width). It prints the room’s area in square feet. It then asks the user whether they wish to convert the room dimensions into square inches or meters. The program prints the results.
Use the following conversion formulae in your program:
area = length * width
1 square foot = 144 square inches
1 square foot = 0.0929 square meters.
Write your algorithm FIRST!!!!
Sample output:
Output I
Please enter the length in feet: 2
Please enter the width in feet: 6
The area is: 12 square feet
Please enter an 's' to print your result in square inches
or an 'm' to print your result in square meters: s
The area is: 1728 square inches
Press any key to continue
Output II
Please enter the length in feet: 6
Please enter the width in feet: 2
The area is: 12 square feet
Please enter an 's' to print your result in square inches
or an 'm' to print your result in square meters: m
The area is: 1.1148 square meters
Press any key to continue