package 作业;
public class 第十次的高度 {
public static void main(String[] args) {
// TODO Auto-generated method stub
double totalDistance = 0.0;
double height = 100.0;
for(int i=1;i<=10;i++)
{
totalDistance += height;
height = height / 2;
if(i<10)
{
totalDistance = totalDistance + height;
}
if(i==10)
System.out.println("第10次反弹"+height+"米");
}
System.out.println("一共经过"+totalDistance+"米");
}
}