It is the ATM problem from Easy Practice Section. I have tried giving various inputs and all outputs are giving the right answers. However, its saying that the code is incorrect. If any mistakes are there please help.
/* package codechef; // don't place package name! */
import java.util.*; import java.lang.*; import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */ class Codechef { public static void main (String[] args) throws java.lang.Exception{ Scanner sc= new Scanner(System.in);
double withdrawl_amt= sc.nextDouble();
double initial_bal= sc.nextDouble();
if((withdrawl_amt%5 == 0)& initial_bal>(withdrawl_amt+0.5)){
double output = initial_bal - withdrawl_amt - 0.5;
System.out.println(output);
}
else{
double output = initial_bal;
System.out.println(output);
}
}
}