Wednesday, 15 February 2017

Math : SqrtMethod

public class SqrtMethod {

    public static void main(String[] args) {

        // get two double numbers numbers        double x = 9;        double y = 25;
        // print the square root of these doubles        System.out.println("Math.sqrt(" + x + ")=" + Math.sqrt(x));        System.out.println("Math.sqrt(" + y + ")=" + Math.sqrt(y));    }
}

No comments:

Post a Comment