diff --git a/src/depositMoney.c b/src/depositMoney.c index 016b92f..093cc34 100644 --- a/src/depositMoney.c +++ b/src/depositMoney.c @@ -26,11 +26,12 @@ bool depositMoney(int customerID){ float amountToDeposit = 0; + printf("\nPlease enter the amount you want to deposit: "); scanf("%f", &amountToDeposit); if(amountToDeposit>0 && amountToDeposit>MINIMUM_DEPOSIT_AMOUNT){ //InitiateDepositMoney(amountToDeposit,availableAccountBalance); - if(updateAvailableAccountBalance(customerID, amountToDeposit, true)==0){ + if(updateAvailableAccountBalance(customerID, availableAccountBalance+amountToDeposit)==0){ printf("\nYou have successfully deposited %.2f. New account balance is %.2f", amountToDeposit, availableAccountBalance+amountToDeposit); askToTryAgain(false); return true; @@ -47,4 +48,5 @@ bool depositMoney(int customerID){ askToTryAgain(true); return false; //invalid input } + return false; } \ No newline at end of file