ATM problem

#include<stdio.h>
main()
{
int wit;
float bal;
scanf("%d%f",&wit,&bal);
if((wit>0)&&(bal>=0)&&(wit<=2000)&&(bal<=2000))
{
bal=(wit>bal)?bal:(wit==bal)?bal:(wit%5==0)?(bal-wit-0.50):bal;
printf("%.2f",bal);
}
return 0;
}

please tell me what is wrong in this code?

You just have to put Parentheses in correct manner as bal=(wit>bal)?bal:((wit==bal)?bal:((wit%5==0)?(bal-wit-0.50):bal)); Hope it helps.

//