ATM Problem (Java)

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*;

/* 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(;

    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;

       double output = initial_bal;




Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

Use >= instead of >