Figure shows a cylindrical tank with a conical base. If

Figure 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 midrange 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 R and d. Use decisional control structure (like If/Then, Elself, 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 massage ("Overtop") if you overtop the tank that is d > 3R.Test it with following data:

3.1 05 1.2 3.0 2R