Exercises 2-6 of Zhejiang University Edition "C Language Programming (3rd Edition)"

Exercise 2-6 Calculate the free fall distance of an object (5 points)

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. Gravitational acceleration of 10 m / sec 2 .
Input format:
There is no input for this question.
Output format:
output
height = vertical distance value according to the following format, and the
result shall be 2 decimal places.
Author
C Course Group
Unit
Zhejiang University

Code length limit
16 KB
Time limit
400 ms
Memory limit
64 MB

#include <stdio.h>

int main() {
    
    
    printf("height = %.2f",1/2.0*10*3*3);
    return 0;
}

Guess you like

Origin blog.csdn.net/DoMoreSpeakLess/article/details/109249192