Wednesday, 15 February 2017

Math : TanMethod

public class TanMethod {

    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.tan(" + x + ")=" + Math.tan(x));        System.out.println("Math.tanh(" + x + ")=" + Math.tanh(x));    }
}

No comments:

Post a Comment