Wednesday, 15 February 2017

Math : SinMethod

public class SinMethod {

    public static void main(String[] args) {

        // get two double numbers numbers        double x = 45;
        // convert them to radians        x = Math.toRadians(x);
        // print the trigonometric sine for these doubles        System.out.println("Math.sin(" + x + ")=" + Math.sin(x));        System.out.println("Math.sinh(" + x + ")=" + Math.sinh(x));    }
}

No comments:

Post a Comment