JAVA 珠穆朗玛
public static void main(String[] args) {
double paperThick = 0.01;
int count = 0;
while (true){
if (paperThick < 8848.0){
count++;
paperThick = paperThick * 2.0;
System.out.println("第"+count+"次折"+paperThick+"M");
}else{
break;
}
}
System.out.println("一共能折"+count+"次");
}
浙公网安备 33010602011771号