|
@ -15,11 +15,11 @@ void initiateWithdraw(float amountToWithdraw, float availableAccountBalance) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void withdraw() { |
|
|
|
|
|
|
|
|
void withdraw(int user_id) { |
|
|
float amountToWithdraw; |
|
|
float amountToWithdraw; |
|
|
char tryDifferentAmount; |
|
|
char tryDifferentAmount; |
|
|
|
|
|
|
|
|
float availableAccountBalance = getAvailableAccountBalance(); |
|
|
|
|
|
|
|
|
float availableAccountBalance = getAvailableAccountBalance(user_id); |
|
|
|
|
|
|
|
|
printf("Enter amount to withdraw: "); |
|
|
printf("Enter amount to withdraw: "); |
|
|
scanf("%f", &amountToWithdraw); |
|
|
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"); |
|
|
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); |
|
|
scanf(" %c", &tryDifferentAmount); |
|
|
if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') { |
|
|
if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') { |
|
|
withdraw(); |
|
|
|
|
|
|
|
|
withdraw(user_id); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
showAllMenuEntries(); |
|
|
showAllMenuEntries(); |
|
@ -40,6 +40,6 @@ void withdraw() { |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
printf("Invalid Input! Please try again.\n"); |
|
|
printf("Invalid Input! Please try again.\n"); |
|
|
withdraw(); |
|
|
|
|
|
|
|
|
withdraw(user_id); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |