Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float height (float v, float t);
- float vertical_speed(float v, float t);
- ///////////////////////////////////////////////////////////////
- int main()
- {
- float v = 200,
- t = 5;
- height (v, t);
- vertical_speed(v, t);
- }
- //////////////////////////////////////////////////////////////
- float height(float v, float t)
- {
- int const g = 10,
- i = 2;
- float height = v*t - (g * t * t) / i;
- printf("height = %.2f\n", height);
- return 0;
- }
- ////////////////////////////////////////////////////////////
- float vertical_speed(float v, float t)
- {
- int const g = 10,
- i = 2;
- float vertical_speed = v - g * t;
- printf("vertical speed = %.2f\n", vertical_speed);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement