Wednesday, 15 February 2017

Math : exp




public class ExpMethod {

    public static void main(String[] args) {

        // get two double numbers        double x = 5;        double y = 0.5;
        // print e raised at x and y        System.out.println("Math.exp(" + x + ")=" + Math.exp(x));        System.out.println("Math.exp(" + y + ")=" + Math.exp(y));    }
}

No comments:

Post a Comment