Java Cube Root


Java Cube Root

import java.util.Scanner;

public class CubeRoot {

   public static void main(String[] args) {

      double d;

      System.out.println("enter two number to find cube root");

      Scanner sc=new Scanner(System.in);

      d = sc.nextDouble();

      System.out.println("cube root is "+Math.cbrt(d));

   }

}