Advertisement
Guest User

Untitled

a guest
May 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. /* write a program to find out velocity of a free fall object from a specific height.
  2. des: as input you will give an floating number as height.. value should not exeed 0<X<250
  3. and out put will be a single floating number with 2 decimal points.
  4. Note: object will fall from a Stable condition. and earth g=9.8m/s2 */
  5.  
  6. #include <stdio.h>
  7. #include <math.h>
  8.  
  9. int main()
  10. {
  11. double height, time, g = 9.8, a, velocity;
  12.  
  13. printf("Please enter your value:");
  14. scanf("%lf", &height);
  15.  
  16. a = (2 * height) / g;
  17.  
  18. time = sqrt (a);
  19.  
  20. velocity = height * time;
  21.  
  22. printf("%0.2lf", velocity);
  23.  
  24. return 0;
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement