write a program to find volume of a cube
Answers
Answered by
4
Answer:
Hey
Explanation:
public class Cube
{
public static void main(String arg[])
{
int side=5; float volume=side * side * side; println("Volume of Cube :"+ volume);
}
}
cutebabe6666:
Hello
Answered by
3
Answer:
import java.util.*;
class volume
{
public void main ()
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter the length of the side of the cube: ");
int n=sc.nextInt();
int v=Math.pow(n,3);
System.out.println("The volume of the cube is "+v);
}
}
Similar questions
Math,
6 months ago
Math,
6 months ago
India Languages,
6 months ago
Math,
1 year ago
Math,
1 year ago