public class Demo { public static void main(String[] args) { double s = 0; double t = 100; for (int i = 1; i <= 10; i++) { s += t; t = t / 2; } System.out.println("第10次落地时,共经过 " + s + " 米"); System.out.println("第10次反弹高度为 " + t + " 米"); } }