摘要: double jiecheng=1; double sum=0; int j=0; for (int i = 1; i <=20; i++) { do { j++; jiecheng=jiecheng*j; } while (j<i); // System.out.println(jiecheng) 阅读全文
posted @ 2016-05-09 13:29 凌零聆 阅读(367) 评论(0) 推荐(0) 编辑
摘要: int i=0; int jiecheng=1; do { i++; jiecheng=jiecheng*i; } while (i<5); System.out.println("5的阶乘为"+jiecheng); 阅读全文
posted @ 2016-05-09 13:27 凌零聆 阅读(367) 评论(0) 推荐(0) 编辑
摘要: //统一单位 double sum=0.00008; int i=0; while (true) { if(sum<8848.13) { i++; sum=sum*2; continue; } if(sum>=8848.13) System.out.println("对折"+i+"次为"+sum+" 阅读全文
posted @ 2016-05-09 13:24 凌零聆 阅读(3950) 评论(0) 推荐(0) 编辑