whats the mistake...??? (ATM)

#include<stdio.h>
int main()
{
float amt,rmn,f;
int wd;

scanf("%d %f", &wd, &amt);

if(amt<=0 || wd<0)
{
exit(0);
}

if(wd%5==0 && amt>wd && wd>=0)
{
f=(float)wd + 0.50;
rmn=amt-f;
printf("%.2f\n",rmn);
}
else
{
printf("%.2f\n",amt);
}

return 0;
}

if amt is zero… you must print “0”… not just exit out…
since the amt is insufficient…
so no need of first if statement

Your condition that “amt>wd” is not proper. Try the test case where amt is 10.1 and wd is 10. It satisfies all conditions of a successful transaction according to your code and it will print -0.40 for that case.

Also no need of first if statement as all input cases are valid and already checked before hand to make sure they lie in the limits mentioned in the question.