wrong answer CAN'T UNDERSTAND WHY????

#include<stdio.h>

int main()
{
int x;
float t,i;
scanf("%d %f",&x,&i);
if(x<i)
{
	if(x%5==0)
	{
	t=((i-x)-0.50);
	printf("%.2f\n",t);
	}
	else
	printf("%.2f\n",i);
}
else
printf("%.2f\n",i);
return 0;
}

Please, read this before your next question.

Ok, it’s ATM problem.

Problem statement is:

  • Pooja would like to withdraw X $US from an ATM
  • The cash machine will only accept the transaction if X is a multiple of 5, and Pooja’s account balance has enough cash to perform the withdrawal transaction (including bank charges).
  • For each successful withdrawal the bank charges 0.50 $US.

Can you describe your approach for this input - http://ideone.com/N0tTwD ?