[Solved] Need Write Program C According Following Description Need Ask User Dimensions Carpet Assum Q37227267
Need to write a program in C according to the followingdescription:
You need to ask the user for the dimensions of the carpetassuming that it will be in the shape of rectangle ( remember thatsquare is also a rectangle with all sides of the same length.) Thecost of carpet is $20 per square units and there is a 10% discounton the price. Program needs to print the cost of carpet afterdeducting the discount.
Here are the functions that should be used in the code andshould be called from the main function-
- One function to ask for the length.
- One function to ask for width.
- One function that calculates the area of the carpet andmultiplies it by 20 to find the total cost.
- Function to find the price after the discount.
- Function to display the price after the discount.
You need to name the functions and decide the function returntype and parameters to be passed. Then write the functiondefinitions and call the functions from the main function.
Expert Answer
Answer to Need to write a program in C according to the following description: You need to ask the user for the dimensions of the … . . .
OR

