小球落地 #include<iostream> usingnamespace std; int main() { int n =10; double high =100, s=100; for(int i=2; i<=n; i++) { high = high*0.5; s += high*2; //从第一次落地后,每次弹起经过的距离都是本次高度的两倍 } cout<<"High is : "<<high<<endl; cout<<"Summation of distance is: "<<s<<endl; system("pause"); return0; }