Advertisement
inhuman_Arif

naughty cat

Oct 17th, 2020
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5.  
  6. int main() {
  7.  
  8.     double h,x,v,t1,t2,new_v,needed_v;
  9.     scanf("%lf %lf %lf",&h,&x,&v);
  10.     t1=sqrt(2*h/9.8);
  11.     t2=(x/v);
  12.     if(t1>=t2)
  13.         printf("YES\n");
  14.     else
  15.     {
  16.         new_v=x/t1;
  17.         needed_v=new_v-v;
  18.         printf("NO %.2lf m/s\n",needed_v);
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement