Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- cout << fixed << setprecision(2);
- double h, x, v;
- cin >> h >> x >> v;
- double v1 = (2 * 9.8 * h);
- v1 = sqrt(v1);
- double t1 = (v1 / 9.8 );
- //cout << t1 << endl;
- double t2 = x/v;
- // cout << t2 << endl;
- if(t1 < t2) {
- cout << "NO " ;
- double c = x/t1;
- cout << c-v << " m/s" << endl;
- }
- else cout << "YES" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement