Why my ATM code is wrong????

atm
atmcode

#1

#include<stdio.h>
int main()
{
float bal,output;
int input;
scanf("%d %f",&input,&bal);

	if(input>=0 && input<=bal+0.5 && input<=bal)
	{
		if(input%5==0)
		{
			output=bal-input-0.5;
			printf("

%.2f
“,output);
}else
printf(”%.2f",bal);
}
}


#2

it should be input+0.5<=bal
in your test condition


#3

input<=bal+0.5

I think the +0.5 should be with input. Meaning, it should be like “Balance<=Amount to withdraw +0.5”


#4

time to close the question as the issue has been resolved. @vijju123