Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. The amount of premixed concrete (in cubic yards) ordered
  2. The thickness of the patio (in inches)
  3. 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:

  1. The length and width of the patio (in feet). (1 cubic yard = 27 cubic feet.)

To calculate the width, you will need to:

  1. Find the total cubic feet of the concrete
  2. 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)
  3. Square root the answer

To find the square root of a decimal number, include the header filecmathusing the statement#include , in your program.

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions