atm getting wrong answer

Here, is my code and i am continuously getting wrong answer and cannot find the reason why… Please help?

import java.util.Scanner;
public class Main
    public static void main(String args[])
        Scanner input=new Scanner(;
       	double x=input.nextDouble();
        double y=input.nextDouble();
                double bal=y-x-0.50;
                System.out.println("Successful Transaction");

u don’t have to print “Successful Transaction” and also remove the equality sign in x+0.50>=y becoz if test case is something like 1 1.50 then its output will be 0.00 but ur code is printing 1.50

you dont need to print "successful transaction "
try to use buffer reader instead of scanner for future programs

thanks a lot, it helped me and finally got the correct answer.

1 1.50 output will be 1.50 instead of 0.00 because 1 is not a multiple of 5, therefore transaction will not be compeleted