Write a program that determines the water height h, as a function of time. The volume in the tank is
V = (1/3)* pi * h*h * (3R - h)
and the velocity of water flowing through the drain is:
dv/dt = -pi * r*r *SQRT(2gh).
Let R(radius of tank) = 30 ft., r(radius of drainpipe) = 0.3 ft, initial h(water in tank) = 50 ft., g(gravitational constant) = 115.8 ft/(min*min), delta t = 0.5 min., final h = 1 ft. Use Euler's method and solve for h and print the results for each interval.
Note: The purpose of this algorithm is to print a calibration table that shows the volume of water in the tank at a given time. It would be useful to have your program flexible for different tanks, i.e., get all necessary information from the user.
mrkmrk: you could try doing your own homework :P This forum (like most) is here to offer people help with their CODE, not with their HOMEWORK. A subtle, but important difference.