Guest User

Untitled

a guest
Dec 14th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class ATM
  2. {
  3. public static void main(String[] args)
  4. {
  5. java.util.Scanner sc = new java.util.Scanner(System.in);
  6. double w_cash = sc.nextDouble();
  7. double balance = sc.nextDouble();
  8. if((w_cash % 5) == 0 && w_cash < balance)
  9. {
  10. double r_cash = balance - w_cash ;
  11. System.out.println(r_cash - 0.50);
  12. }
  13. else
  14. {
  15. System.out.println(balance);
  16. }
  17.  
  18. }
  19. }
Add Comment
Please, Sign In to add comment