So below is my code, there’s a test case in there somewhere which invalidates my code, but I can’t see it, and it’s driving me nuts.
#include “stdio.h”
int main()
{
int x = 0;
float y=0;
float charge = 0.5;
scanf("%d%f",&x,&y);
if ((x>y) || (x % 5 != 0) || (x>2000) || (x<1) || (y<0) || (y>2000))
{
printf("%0.2f",y) ;
return 0;
}
float result = (y-x-charge);
printf("%0.2f",result);
return 0;
}