ATM Problem showing wrong answer in C

Hello, so I wrote this code, but it’s showing me wrong answer, can you help me in this?

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

1)Change y>(x+0.5) to y “>=” (x+0.5) as balance can be zero after a transaction.

2)Put the second printf in an “else” clause otherwise you will get 2 outputs for valid transactions.

3)use “\n” in the printf.

//