Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Write a C++ program to calculate the time to drain a cylindrical water tank for an initial water height ranging from 1 to 10

C++ image text in transcribed
image text in transcribed
image text in transcribed
Write a C++ program to calculate the time to drain a cylindrical water tank for an initial water height ranging from 1 to 10 feet (in increments of 1 ft). The tank has a nominal radius (rt) of 2 feet and the minimum drain radius (rd) is 0.3 inch. The gravitational constant (g) is 32.2 feet/sec2. The formula for time to drain the tank is time2h/vavg where, average velocity, vavg 0.5(2gh) In your program, assign the values to the variable g. Prompt user to enter the value of rt. The program should calculate the value of vavg, for a given value of rd, and then display time in hours. Using MS Visual Studio, create a project folder called tank_mod and a source code file tank_mod.cpp. Use the function pow() in the formulas and NOT sqrt). Set up the output statements (cout) such that the tabular display looks like the following: Specified tank radius-2 ft. Drain radius = 0.3 inch Initial water height (ft. Time to drain (hrs.) 0.44 2 10 Drain radius0.4 inch STEP 1: Analyze the Problem There is only one required output (time in hour of data type double) and one input rt. All intermediate variables will be assigned a data type of double

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

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago