The formula for the volume of a cylinder is height x p x diameter 22 where diameter 2 is the radius of the base d 2 x r so another way to write it is height x p x radius2. Another way to calculate this is to use the perimeter P and the area A of the base shape. 785 10 785.
Java program to calculate the volume of a sphere.
Another way to calculate this is to use the perimeter P and the area A of the base shape. In this example area of base circle pr 2 314 5 5 785cm 2. For example to calculate the volume of a cone with a radius of 5cm and a height of 10cm. Contribute your code and comments through Disqus.