一球从100米高度自由落下,每次落地后反跳回原高度的一半;再落下,求它在 第10次落地时,共经过多 少米?第10次反弹多高? class Demo{public static void main(String[] args){double meter = 100;do
class Demo{
public static void main(String[] args){
double meter = 100;
double total = 100;
for(int i = 0; i < 10; i++) {
meter = meter/2;
total = meter*2+total;
}
System.out.println(meter);
System.out.println(total);
}
}
