@@ -0,0 +1,1835 @@
+package java_problems.beginner;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * All submissions for this problem are available.%0D%0A * %0D%0A * Pooja would like to withdraw X $US from an ATM. The cash machine will only%0D%0A * accept the transaction if X is a multiple of 5, and Pooja's account balance%0D%0A * has enough cash to perform the withdrawal transaction (including bank%0D%0A * charges). For each successful withdrawal the bank charges 0.50 $US. Calculate%0D%0A * Pooja's account balance after an attempted transaction.%0D%0A * Input%0D%0A * %0D%0A * Positive integer 0 %3C X %3C= 2000 - the amount of cash which Pooja wishes to%0D%0A * withdraw.%0D%0A * Nonnegative number 0 %3C= Y %3C= 2000 with two digits of precision - Pooja's%0D%0A * initial account balance.%0D%0A * %0D%0A * Output:%0D%0A * Output the account balance after the attempted transaction, given as a number%0D%0A * with two digits of precision. If there is not enough money in the account to%0D%0A * complete the transaction, output the current bank balance.%0D%0A * %0D%0A * Example - Successful Transaction%0D%0A * Input:%0D%0A * 30 120.00%0D%0A * %0D%0A * Output:%0D%0A * 89.50%0D%0A * %0D%0A * Example - Incorrect Withdrawal Amount (not multiple of 5)%0D%0A * Input:%0D%0A * 42 120.00%0D%0A * %0D%0A * Output:%0D%0A * 120.00%0D%0A * %0D%0A * Example - Insufficient Funds%0D%0A * Input:%0D%0A * 300 120.00%0D%0A * %0D%0A * Output:%0D%0A * 120.00%0D%0A */%0D%0Apublic class ATM %7B%0D%0A%0D%0A%09private static final double WITHDRAWAL_FEE = 0.5;%0D%0A%09%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09 %0D%0A%09    Scanner sc = new Scanner(System.in);%0D%0A%09    %0D%0A%09    double withdrawal = sc.nextDouble();%0D%0A%09    double initialBalance = sc.nextDouble();%0D%0A%09    double totalWithdrawal = withdrawal + WITHDRAWAL_FEE;%0D%0A%09    %0D%0A%09    if (withdrawal %25 5 != 0 %7C%7C totalWithdrawal %3E initialBalance) %7B%0D%0A%09        System.out.printf(%22%25.2f%22, initialBalance);%0D%0A%09    %7D else %7B%0D%0A%09    %09System.out.printf(%22%25.2f%22, initialBalance - totalWithdrawal);%0D%0A%09    %7D%0D%0A%09    sc.close();%0D%0A%09%7D%0D%0A%7D

Add ATM