Slip 10 Cube

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import java.util.

*;
import java.lang.*;
class Main
{
public static void main (String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number: ");
int num = sc.nextInt();

//Calculating the cube of the number


int cube = (int) Math.pow(num,3);

System.out.println("Cube of the number "+num+" is "+cube+" .");

}
}

You might also like