Question: Write a C program that allows the user to balance a checking account. The program should first prompt the user to enter the beginning balance

Write a C program that allows the user to balance a checking account. The program should first prompt the user to enter the beginning balance of his/her checking account (must allow for dollars and cents, and not less than zero). The program should then prompt the user to enter the number of deposits to be posted, and then the number of checks to be posted. For this assignment, let's set a maximum of 10 checks and/or deposits, you'll see why as you read on. Using a loop, the program should then prompt the user to enter the amount of the first deposit (a positive amount to add to the checking account balance), the amount of the second, the third, & etc., until the number of deposits have been processed. Using a second loop, the program should then prompt the user to enter the amount of the first check (a positive amount to be subtracted from the checking account balance), then amount of the second, the third, etc. until all* checks have been processed. Also, if the balance in the account goes below zero, a warning will be displayed as shown. Once all checks and deposits have been made, the program should output the Reconciliation report. Read all the specifications carefully. I did not show all the editing features you are required to do, but they are in bold above. The dialog with the user should look exactly like the following, only with your special introductory statement(s) as you wish:

Welcome to the Sears Checking Account System First, enter the name of the Bank:

First Federal Now enter the balance $ 200.55

Enter the number of checks: 2

Enter the number of deposits: 55

Error: Number of deposits must be at most 10, please re-enter.

Enter the number of deposits: 7

Enter the amount of deposit #1: 12

Enter the amount of deposit #2: 13.22

Enter the amount of deposit #3: 11

Enter the amount of deposit #4: 40

Enter the amount of deposit #5: 33

Enter the amount of deposit #6: 22.22

Enter the amount of deposit #7: 33

Enter the amount of check #1: 111

Enter the number of check #1: 3321

Enter the amount of check #2: 272

Enter the number of check #2: 3322

** WARNING: INSUFFICIENT FUNDS **

First Federal Reconciliation Report Starting Balance: $ 200.33

Deposit # 1: 12.00

Deposit # 2: 13.22

Deposit # 3: 11.00

Deposit # 4: 40.00

Deposit # 5: 33.00

Deposit # 6: 22.22

Deposit # 7: 33.00

Checks:

Number: 3321

Amount: 111.00

Number: 3322

Amount: 272.00

Ending Balance: $ -18.23

Your First Federal account is overdrawn.

There should be error checking on all user input, and trap loops are needed. These are discussed in the online notes and examples, and discussed in chats. It is hard to see in this document, but I want you to align the decimal points in the account reconciliation summary report. You are to keep track of all the deposits and checks so that you can print them out in reconciliation report form. You do this by storing them in arrays. You want to be sure that the size of the arrays are large enough to handle 10 deposits and 10 checks. Perhaps:

float deposits[10], checks [10];

int check_numbers[10];

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!