作者: 歌...者 时间: 2015-9-6 00:52
大哥你确定这是对的?作者: zzh1026 时间: 2015-9-6 00:57
class Test2_High {
public static void main(String[] args) {
System.out.println("Hello World!");
int high = 100,sum = 0;
for (int i = 1;i <= 10 ;i++ ) {
sum = sum + high;
high = high / 2;
sum = sum + high;
}
System.out.println("10次以后小球的高度为:" + high + ", 10次以后小球运行的距离为:" + sum);
}
}