首页 电脑 电脑学堂 查看内容

java例程练习(Math类)

2012-5-3 11:08 640 0

摘要: public class Test {     public static void main(String[] args) {  &nbs...
关键词: nbsp Math println System double public random toDegrees toRadians pow

public class Test {     public static void main(String[] args) {         double a = Math.random();         double b = Math.random();         System.out.println(Math.sqrt(a*a+b*b));         System.out.println(Math.pow(a, 8));         System.out.println(Math.round(b));         System.out.println(Math.log(Math.pow(Math.E, 15)));         double d = 60.0;         double r = Math.PI / 4;         System.out.println(Math.toRadians(d));         System.out.println(Math.toDegrees(r));         System.out.println(Math.PI);         System.out.println(Math.E);     } } 摘自 Yours风之恋
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部