Write a program to ask the user for the length of the room


Write a program to ask the user for the length of the room (in inches) to be carpeted, the width of the room (in inches) to be carpeted, and the price of a square foot of carpeting.

For both the length and width, make sure the number entered is a non-zero positive number, and continue to ask the user for the value until a valid number is entered.

For the price of a square foot of carpeting, make sure that the price is between $1.00 and $10.00 inclusive, and continue to ask for the price until a valid number is entered.

Then, using 5 different functions, calculate:

• The square footage of the room

• The number of hours required to carpet the room

• The price for the carpet to cover the room

• The labor charges to carpet the room

• The total cost to carpet the room

Create global constants for:

• The number of square feet that can be carpeted in 4 hours (65)

• The number of hours required to carpet 65 sq. ft. (4)

• The labor rate (25.00)

• The minimum carpet price (1.00)

• The maximum carpet price (10.00)

• Any other numbers used in your program

The program will display:

• The square footage of the room

• The number of hours to carpet the room

• The price for the carpet

• The labor charges

• The total cost to carpet the room

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program to ask the user for the length of the room
Reference No:- TGS02889484

Expected delivery within 24 Hours