1 double height = 100;// 高度100米 2 double fantan = height / 2; //第反弹反弹高度 3 int i = 0; 4 for (i = 2;i<= 10;i ++){ 5 height = height + fantan * 2; //第i落经少米 6 fantan = fantan / 2;//第i反弹高度 7 } 8 9 System.out.println("第" + i + "落经" + height +"米"); 10 System.out.println("第" + i + "反弹" + fantan + "米");