View Code of Problem 104

#include<stdio.h>
int main(){
    float n,v1,v2,t;
    while(scanf("%f%f%f%f",&n,&v1,&v2,&t)!=EOF){
            float t1;
        if(v2>v1)
            printf("NO\n");
    else{
        t1=1000*n/(v1-v2);
    if(t1<=t)
        printf("%.2f\n",t1);

    else
        printf("NO\n");
    }
    }
}

Double click to view unformatted code.


Back to problem 104