WAP to calculate cube and cube root of entered number.
Answers
Answered by
2
import java.util.*;
public class Cubes
{
public static void main (String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Please Enter A Value");
double A = sc.nextDouble();
double cube = A*A*A;
double cbrt = Math.cbrt(A);
System.out.println("Cube of the Entered Value = "+cube);
System.out.println("Cube Root Of the Entered Value = "+cbrt);
sc.close();
}
}
Similar questions