don't know why my code is giving wrong answer

link to the problem: HS08TEST Problem - CodeChef

here is my code:

#include<stdio.h>
int main()
{
int x,k;
float y;
scanf(“%d %f”,&x,&y);
k=x%5;
if((k==0)&&((x-0.5)<y))
y=y-x-0.5;
printf(“%.2f”,y);
return 0;
}

Help please!!

You get an incorrect out put for this case

120 120.00

And your output is

-0.50

When the actual output should have been

120.00

  if( ( k == 0 ) && ( (x + 0.5 ) <= y ) )
                         ^         ^
              + instead of -       <=

You need ( x + 0.5 ) <= y