世界上最高山峰是珠穆朗玛峰(8848.86米)假如我有一张足够大的纸,它的厚度是0.1毫米。
请问我要折叠多少次可以折到珠穆朗玛峰的高度(用while循环实现)
public static void main(String[] args) {
double x = 0.1;
int count = 0;
while (true) {
if (x > 8848.86 * 1000) {
break;
}
count++;
x = 2 * x;
}
System.out.println("折叠次数:" + count);
}