#include <stdio.h> #include <math.h> #define N 10 //一个球从100米高度自由落下,每次落地后返回高度的一半,再落下,再反弹。求它在第10次落地时,共经过多少米? main() { float s=200,b=100,c; int a; for(a=3;a<=N;a++) { //s=s+b; b=b/2; s+=b; printf("%.5f %.5f\n",s,b); } getchar(); }
标签:11,10,P74,C语言,100,include From: https://www.cnblogs.com/xkdn/p/16734481.html