Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include <stdlib.h>
- int main() {
- double h,x,v,t1,t2,new_v,needed_v;
- scanf("%lf %lf %lf",&h,&x,&v);
- t1=sqrt(2*h/9.8);
- t2=(x/v);
- if(t1>=t2)
- printf("YES\n");
- else
- {
- new_v=x/t1;
- needed_v=new_v-v;
- printf("NO %.2lf m/s\n",needed_v);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement