呵呵,上边的回答有些高了。这题按你说的先下落100米再反弹50米就150了,再落地又加50米,不就200米的行程了吗?所以我想是第二次落地时,行程就是200米了。
题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半;再落下,求它在
第10次落地时,共经过多少米?第10次反弹多高?
1.程序分析:见下面注释
2.程序源代码:
#include "stdio.h"
#include "stdio.h"
main()
{
float sn=100.0,hn=sn/2;
int n;
for(n=2;n<=10;n++)
{
sn=sn+2*hn;/*第n次落地时共经过的米数*/
hn=hn/2; /*第n次反跳高度*/
}
printf("the total of road is %f\n",sn);
printf("the tenth is %f meter\n",hn);
getch();
}
这个是WIN-TC的教程,如果你用C++编译器,不用打最后的getch();
100+50*2=200
弹了1次