Advertisement
dllbridge

Untitled

Nov 29th, 2023
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.80 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. float height        (float v, float t);
  5. float vertical_speed(float v, float t);
  6.  
  7. ///////////////////////////////////////////////////////////////
  8. int main()
  9. {
  10.  
  11.     float v = 200,
  12.           t =   5;
  13.     height        (v, t);
  14.     vertical_speed(v, t);
  15. }
  16. //////////////////////////////////////////////////////////////
  17.  
  18.    float height(float v, float t)
  19. {
  20.    
  21.        int const g = 10,
  22.                  i =  2;
  23.      
  24.        float height = v*t - (g * t * t) / i;
  25.  
  26.        
  27.        printf("height = %.2f\n", height);
  28.        return 0;
  29.      
  30. }
  31.    ////////////////////////////////////////////////////////////
  32.    float vertical_speed(float v, float t)
  33. {
  34.        int const g = 10,
  35.                  i =  2;
  36.  
  37.        float vertical_speed = v - g * t;
  38.  
  39.  
  40.        printf("vertical speed = %.2f\n", vertical_speed);
  41.  
  42.        return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement