2022/09/29 22:36 修改存储卡余额判断由>至>=

This commit is contained in:
zyx 2022-09-29 22:37:37 +08:00
parent e17519f1c1
commit 66bc7cfa1a

View File

@ -189,7 +189,7 @@ public class Driver {
System.out.print("请输入取款金额:");
double balance = scanner.nextDouble();
Double accountBalance = savingAccount.getBalance();
if (accountBalance > balance){
if (accountBalance >= balance){
savingAccount.setBalance(accountBalance - balance);
System.out.println("成功取款 " + balance + "");
} else System.out.println("取款失败,余额不足");