/* Program for computing the volume of a sphere */
class P4
{
public static void main(String args[])
{
float r=2, volume, pi = 3.14152F;
volume = (4 * pi * r * r * r) / 3 ;
System.out.println("Volume : "+volume);
}
}
class P4
{
public static void main(String args[])
{
float r=2, volume, pi = 3.14152F;
volume = (4 * pi * r * r * r) / 3 ;
System.out.println("Volume : "+volume);
}
}
0 comments:
Post a Comment