diff --git a/src/withdrawMoney.c b/src/withdrawMoney.c index 4a2f1f5..66c201b 100644 --- a/src/withdrawMoney.c +++ b/src/withdrawMoney.c @@ -1,13 +1,18 @@ #include "withdrawMoney.h" void initiateWithdraw(float amountToWithdraw, float availableAccountBalance) { + char returnToHomeInput = NULL; float remainingAccountBalance = (availableAccountBalance - amountToWithdraw); updateAccountBalance(remainingAccountBalance); printf("You have successfully withdrawn %f €.\n", amountToWithdraw); printf("Remaining account balance: %f €\n\n", remainingAccountBalance); printf("Press any key to return to home page: "); - // go to home page + scanf("%c", &returnToHomeInput); + + if (returnToHomeInput) { + showAllMenuEntries(); + } } void withdraw() { @@ -29,7 +34,7 @@ void withdraw() { withdraw(); } else { - // return to home page + showAllMenuEntries(); } } }