Wednesday, 15 February 2017

Math : cosh




public class CoshMethod {

    public static void main(String[] args) {

        // get two double numbers        double x = 45.0;        double y = 180.0;
        // convert them to radians        x = Math.toRadians(x);        y = Math.toRadians(y);
        // print their hyperbolic cosine        System.out.println("Math.cosh(" + x + ")=" + Math.cosh(x));        System.out.println("Math.cosh(" + y + ")=" + Math.cosh(y));    }
}

No comments:

Post a Comment