View Code of Problem 104

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

Double click to view unformatted code.


Back to problem 104