2022/09/29 22:36 修改存储卡余额判断由>至>=
This commit is contained in:
parent
e17519f1c1
commit
66bc7cfa1a
@ -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("取款失败,余额不足");
|
||||
|
Loading…
x
Reference in New Issue
Block a user