Tag: 银行

C:警告:’withdraw_amt’可以在此function中未初始化使用

我正在为C类的介绍编写一个程序,并在尝试使用gcc编译时不断收到警告。 这是我的代码: int main () { float balance; float beg_balance; float withdrawal_amt; float deposit_amt; float amount; int total_withdrawals; int total_deposits; int selection; print_greeting (); printf(“Let’s begin with your beginning balance”); beg_balance = get_positive_value(); do { print_menu (); scanf(“%d”, &selection); switch (selection) { case WITHDRAWAL: get_positive_value(); balance = withdrawal(balance, withdrawal_amt, amount); break; case DEPOSIT: get_positive_value(); balance […]