Browse Source

Add initiateWithdraw function

remotes/origin/feature/withdraw-money-system
Shivam Chaudhary 2 years ago
parent
commit
d98031e24b
  1. 12
      src/withdrawMoney.c

12
src/withdrawMoney.c

@ -1,4 +1,14 @@
#include <stdio.h>
#include "withdrawMoney.h"
void initiateWithdraw(float amountToWithdraw, float availableAccountBalance) {
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
}
void withdraw() {
float amountToWithdraw;

Loading…
Cancel
Save