#include<iostream> using namespace std; int main(){ int n,v1,v2,t; while(cin>>n>>v1>>v2>>t){ float s; if(v1-v2>0){ s=(float)n*1000/(v1-v2); if(s<=t){ printf("%.2f\n",s); } else cout<<"NO"<<'\n'; } else cout<<"NO"<<'\n'; } } |
Double click to view unformatted code.