class ep5_15 {
public static void main(String args[]) {
System.out.println("Pi=" + Math.PI);
System.out.println("E=" + Math.E);
System.out.println("abs(-6.8)=" + Math.abs(-6.8));
System.out.println("ceil(6.8)=" + Math.ceil(6.8));
System.out.println("floor(8.6)=" + Math.floor(8.6));
System.out.println("max(-5,-6)=" + Math.max(-5, -6));
System.out.println("min(5,6)=" + Math.min(5, 6));
System.out.println("round(8.6)=" + Math.round(8.6));
System.out.println("sqrt(16)=" + Math.sqrt(16));
System.out.println("exp(1)=" + Math.exp(1));
System.out.println("log(e)=" + Math.log(Math.E));
System.out.println("pow(2,3)=" + Math.pow(2, 3));
System.out.println("sin(30degree)=" + Math.sin(Math.toRadians(30)));
System.out.println("atan(90degree)=" + Math.atan(Math.PI / 2));
}
}
这个代码分享一下
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |