Here, is my code and i am continuously getting wrong answer and cannot find the reason why… Please help?
public class Main
public static void main(String args)
Scanner input=new Scanner(System.in);
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.
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
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