java,循环语句,while语句

public class t5 {
 //折纸多少次能达到 8848米,纸的厚度0.08毫米

 public static void main(String[] args) {
  double d=0.08;
  int i=0;
  while(d<8848000)
  {
   d*=2;
   i++;
  System.out.println("需要对折次数:"+i+"纸的厚度:"+d);
  }

}

}

原文地址:https://www.cnblogs.com/jiang2538406936/p/5217350.html