|
|
@ -19,10 +19,10 @@ void withdraw(int user_id) { |
|
|
|
float amountToWithdraw; |
|
|
|
char tryDifferentAmount; |
|
|
|
|
|
|
|
float availableAccountBalance = getAvailableAccountBalance(user_id); |
|
|
|
|
|
|
|
printf("Enter amount to withdraw: "); |
|
|
|
scanf("%f", &amountToWithdraw); |
|
|
|
|
|
|
|
float availableAccountBalance = getAvailableAccountBalance(user_id); |
|
|
|
if (amountToWithdraw > 0) { |
|
|
|
if (amountToWithdraw <= availableAccountBalance) { |
|
|
|
initiateWithdraw(amountToWithdraw, availableAccountBalance); |
|
|
|