Question: 1. This problem is a checking account with online access. The primary goal of this problem is to implement and know when to implement pass




1. This problem is a checking account with online access. The primary goal of this problem is to implement and know when to implement pass by reference and pass by value. The goals are: 1. Write the functions 2. Write the prototypes 3. Write the function calls 4. Know when to pass by reference and pass by value. Problem statement: The program starts by asking the user the beginning balance of the account. The opening (or beginning) balance must be between 100 and 5000 dollars otherwise an error message prints and the program is done. Once the initial balance is entered correctly the program can begin completing transactions. Users will complete several transactions until Q is entered. The transactions are: B - Print available balance D - Deposit an amount entered by user into the account. Deposit may be between 20 and 1000 dollars. After deposit print current balance. W - Withdraw an amount entered by the user. User must have money available or the withdraw is canceled with an error message printed Print the current balance is printed. Q- Quit the program and display results including: The number of all transactions The number of deposits The number of withdrawals Available current balance The functions to be implemented are prt_bal, deposit, withdraw, finalReport For all the functions determine the information passed as well as how to pass it. Complete all the calculations to ensure the final balance is correct. #define _CRT_SECURE_NO WARNINGS #include Wprototypes void printinstructions: void acctSetup(double *openBalance, double curBalance) int main(void) char code: double amount - 0.0 double openBalance = 0.0, curBalance = 0.0: int numDeposit - O, numWithdraw = 0, numTrans = 0; int done - 0; printinstructions: acctSetup(&openBalance, &curBalance) printf("Please first action (P-Print Balance, D-Deposit, W-Withdraw, Q-Quit "); scanf("%c", &codel while (code - 00) if (code == 'P') printf("P was chosen": prt_ball): 1 if (code - 'D') printf("D was chosen"): I/deposit(): ) if (code - W') printf("W was chosen"); withdraw(); 1 printf("Please enter next code: "); scanf("%c", &codek code-toupper(code): Whinal Report call here return 0; "FUNCTIONS void printinstructions(void) assume correct void acetSetup/double" openBalance, double curBalance) int done = 0; double amount = 0; while (done == 0) printf("Please enter starting balance of account : "); scanf("%f. Samount); if (amount 1000) printf("Starting amounting not in proper range, must be between 20 and 1000 "); else openBalance - amount: 'cur Balance - amount: done - 1: Write the functions below including prt_bal, deposit, withdraw, finalReport 1. This problem is a checking account with online access. The primary goal of this problem is to implement and know when to implement pass by reference and pass by value. The goals are: 1. Write the functions 2. Write the prototypes 3. Write the function calls 4. Know when to pass by reference and pass by value. Problem statement: The program starts by asking the user the beginning balance of the account. The opening (or beginning) balance must be between 100 and 5000 dollars otherwise an error message prints and the program is done. Once the initial balance is entered correctly the program can begin completing transactions. Users will complete several transactions until Q is entered. The transactions are: B - Print available balance D - Deposit an amount entered by user into the account. Deposit may be between 20 and 1000 dollars. After deposit print current balance. W - Withdraw an amount entered by the user. User must have money available or the withdraw is canceled with an error message printed Print the current balance is printed. Q- Quit the program and display results including: The number of all transactions The number of deposits The number of withdrawals Available current balance The functions to be implemented are prt_bal, deposit, withdraw, finalReport For all the functions determine the information passed as well as how to pass it. Complete all the calculations to ensure the final balance is correct. #define _CRT_SECURE_NO WARNINGS #include Wprototypes void printinstructions: void acctSetup(double *openBalance, double curBalance) int main(void) char code: double amount - 0.0 double openBalance = 0.0, curBalance = 0.0: int numDeposit - O, numWithdraw = 0, numTrans = 0; int done - 0; printinstructions: acctSetup(&openBalance, &curBalance) printf("Please first action (P-Print Balance, D-Deposit, W-Withdraw, Q-Quit "); scanf("%c", &codel while (code - 00) if (code == 'P') printf("P was chosen": prt_ball): 1 if (code - 'D') printf("D was chosen"): I/deposit(): ) if (code - W') printf("W was chosen"); withdraw(); 1 printf("Please enter next code: "); scanf("%c", &codek code-toupper(code): Whinal Report call here return 0; "FUNCTIONS void printinstructions(void) assume correct void acetSetup/double" openBalance, double curBalance) int done = 0; double amount = 0; while (done == 0) printf("Please enter starting balance of account : "); scanf("%f. Samount); if (amount 1000) printf("Starting amounting not in proper range, must be between 20 and 1000 "); else openBalance - amount: 'cur Balance - amount: done - 1: Write the functions below including prt_bal, deposit, withdraw, finalReport