why am i getting wrong answer for the ATM prob????...it works fine in an online compiler

#include <stdio.h>

int main() {
int i;
float j;
scanf("%d\n%f",&i,&j);
if((i%5)!=0 || (i>j) )
{
printf("f",j); } else { printf(".2f",j-i-0.5);
}

return 0;

}

Sorry! i solved it myself!..i dint check for i+0.5 >j condition

//