View Code of Problem 104

#include<stdio.h>
#include<math.h>

int main()
{

int a,b,c,d;
float s;
while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF)
{if(a>0)
{
	if(c>=b) printf("NO\n");

	else{

s=(float)a*1000.0/(b-c);
if(d>s)
printf("%.2lf\n",s);
else printf("NO\n");
}


}}
return 0;
}

Double click to view unformatted code.


Back to problem 104