资讯 热点 聚焦 探测 工具 行业 公司 行情 市场 招标
您的位置: 首页>热点 > >正文
2023-04-30 14:00:10 来源:互联网


(资料图片仅供参考)

1、题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半;再落下,求它在 第10次落地时。

2、共经过多少米?第10次反弹多高? 1.程序分析:见下面注释 2.程序源代码: 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",sn); printf("the tenth is %f meter",hn); }。

本文到此分享完毕,希望对大家有所帮助。

标签: