|
|
@ -15,11 +15,11 @@ void initiateWithdraw(float amountToWithdraw, float availableAccountBalance) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void withdraw() { |
|
|
|
void withdraw(int user_id) { |
|
|
|
float amountToWithdraw; |
|
|
|
char tryDifferentAmount; |
|
|
|
|
|
|
|
float availableAccountBalance = getAvailableAccountBalance(); |
|
|
|
float availableAccountBalance = getAvailableAccountBalance(user_id); |
|
|
|
|
|
|
|
printf("Enter amount to withdraw: "); |
|
|
|
scanf("%f", &amountToWithdraw); |
|
|
@ -31,7 +31,7 @@ void withdraw() { |
|
|
|
printf("You don't have sufficient money to withdraw. Do you want to try different amount?\n[y]: Yes, any other key : exit"); |
|
|
|
scanf(" %c", &tryDifferentAmount); |
|
|
|
if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') { |
|
|
|
withdraw(); |
|
|
|
withdraw(user_id); |
|
|
|
} |
|
|
|
else { |
|
|
|
showAllMenuEntries(); |
|
|
@ -40,6 +40,6 @@ void withdraw() { |
|
|
|
} |
|
|
|
else { |
|
|
|
printf("Invalid Input! Please try again.\n"); |
|
|
|
withdraw(); |
|
|
|
withdraw(user_id); |
|
|
|
} |
|
|
|
} |