Thursday, February 26, 2009

java code to find volume of a cube

public class Volumecube
{
public static void main(String [] s)
{
int j=Integer.parseInt(s[0]);
int vol;
vol=j*j*j;
System.out.println();
System.out.println("The volume of cube of side "+s[0]+" is"+" "+ vol);
}
}

0 comments: