https://www.codechef.com/problems/HS08TEST

https://www.codechef.com/problems/HS08TEST
#include <stdio.h>

int main(void)
{

float d;
float b;
int a;


scanf("%d",&a);

scanf("%f",&b);

if(a%5==0 && b+0.50>a )
{printf("%f",d=b-a-0.50);
}
else
{

printf("%f",b);
}
}
even all the input and output are same the compiler is saying the answer is wrong? how?

no if(a%5==0 && b+0.50>a )

this is right
if(a%5==0 && b+0.50>=a )

I don’t know english very well, so I don’t describe it.:grinning:

1 Like

after using it also the compiler is showing the wrong answer