计算珠峰的高度

public class ZhuFengTest1 {
public static void main(String[] args){
int count=0; //叠的次数
int h=884800; //峰的高度
int l=1; //定义纸的厚度为0.01 变成int型为1
while(l<h){
count++;
l*=2;
System.out.println("叠第"+count+"次厚度是"+l);
}
System.out.println("要叠"+count+"次");

}
}

posted @ 2015-06-22 21:55  G.J.B  阅读(184)  评论(0编辑  收藏  举报