Concept explainers
Figure P2.13 shows a cylindrical tank with a conical base. If the liquid level is quite low in the conical part, the volume is simply the conical volume of liquid. If the liquid level is mid-range in the cylindrical part, the total volume of liquid includes the filled conical part and the partially filled cylindrical part. Write a well-structured function procedure to compute the tank's volume as a function of given values of R and d. Use decisional control structures (like If/Then, ElseIf, Else, End If). Design the function so that it returns the volume for all cases where the depth is less than 3R. Return an error message (“Overtop”) if you overtop the tank, that is,
R | 1 | 1 | 1 | 1 |
d | 0.5 | 1.2 | 3.0 | 3.1 |
FIGURE P2.13
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Numerical Methods For Engineers, 7 Ed
- bThe average rate of change of the linear function f(x)=3x+5 between any two points is ________.arrow_forwardA company that makes and sells baseball caps has found that the total monthly cost C in dollars of producing x caps is given by the function C(x)=0.2x280x+9000. Find the production level that will minimize the monthly cost and find the minimum cost.arrow_forward
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningGlencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw Hill
- Mathematics For Machine TechnologyAdvanced MathISBN:9781337798310Author:Peterson, John.Publisher:Cengage Learning,College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning