Whenever I use the following code:
import java.util.Scanner;
public class ATM{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int withdraw = in.nextInt();
float balance = in.nextFloat();
if(withdraw > 0){
if(withdraw % 5 == 0){
if(withdraw < balance){
balance -= withdraw + 0.50;
}
}
}
System.out.printf("%.2f\n",balance);
}
}
I always get WA. I have tested 0 0 fine, decimals, negitives, I always get the correct answer, but when I submit it, WA