#K7551. Cylinder Volume Calculation
Cylinder Volume Calculation
Cylinder Volume Calculation
In this problem, you are given a series of pairs of integers representing the height and radius of a cylindrical container. Your task is to compute the volume of each cylinder using the formula (V = \pi r^2 h) and output the result rounded to two decimal places. The input terminates with a line containing "0 0", which should not be processed. This problem tests your ability to parse input, perform arithmetic computations with floating point numbers, and format the output correctly.
inputFormat
The input consists of several lines. Each line contains two integers separated by a space representing the height (h) and radius (r) of a cylinder. The input is terminated by a line that contains the pair "0 0" which should not be processed.
outputFormat
For each valid cylinder (before the termination line), output the calculated volume on its own line. The volume should be computed using the formula (V = \pi r^2 h) and printed with exactly two decimal places.## sample
10 5
7 2
0 0
785.40
87.96
</p>