一个物体从100米的高空自由落下。编写程序,求它在前3秒内下落的垂直距离。设重力加速度为10米/秒 2 。

#include<stdio.h>
int main() {
	int g,t;
	double s;

	t=3;
	g=10;
	s=0.5 * 10 * t * t;

	printf("height = %.2lf",s);

	return 0;

}

 

posted @ 2022-07-12 10:34  四年yd  阅读(4422)  评论(0)    收藏  举报