#C9905. Maximum Water Volume in a Cylindrical Tank
Maximum Water Volume in a Cylindrical Tank
Maximum Water Volume in a Cylindrical Tank
Given the radius r and height h of a cylindrical water tank, compute the maximum volume of water it can hold. The volume V is calculated using the formula:
\( V = \pi r^2 h \)
Your program should read two floating-point numbers from standard input representing r and h, and output the computed volume to standard output. The answer should be computed using high precision, and the output should match the expected floating point result.
inputFormat
The input consists of a single line containing two floating-point numbers separated by space. The first number represents the radius (r) of the cylindrical tank's base and the second number represents the height (h) of the tank.
outputFormat
Output a single floating-point number which is the maximum volume of water the tank can hold, computed using the formula ( V = \pi r^2 h ).## sample
3.0 5.0
141.3716694115407