An object fell freely from an altitude of 100 meters. Write a program to find the vertical distance it falls in the first 3 seconds. Let the acceleration of gravity be10米/秒2
Input format:
This question has not been entered.
Output format:
Output in the following format
height = 垂直距离值
The result is rounded to 2 decimal places.
Code:
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
int main(){
double height;
int t = 3,g = 10;
height = 0.5 * g * pow(t,2);
printf("height = %.2lf",height);
return 0;
}