Question
Instructions A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be, say, four inches thick. The length
Instructions
A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be, say, four inches thick. The length of the patio is to be, say, twice the width
.
produce a program that prompts the user to specify:
- The amount of premixed concrete (in cubic yards) ordered
- The thickness of the patio (in inches)
- The ratio of length and width
- Ex. If the ratio is 3 to 2, have the program accept a3then a2. Then compute the ratio using these numbers
The program then outputs:
- The length and width of the patio (in feet). (1 cubic yard = 27 cubic feet.)
To calculate the width, you will need to:
- Find the total cubic feet of the concrete
- Divide the total cubic feet of concrete by the result of the length to width ratio multiplied by the thickness of the patio, over 12 (inches in a foot)
- Square root the answer
To find the square root of a decimal number, include the header filecmathusing the statement#include
The functionsqrt, included in this header file, determines the square root of a decimal number. For example,sqrt(16.0) = 4.0.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started