Practice Problem 4: Bank Charges

Objective: To calculate bank charges and verify input using if-statements

Please do Programming Challenge #6 at the end of Chapter 4 (page 212). Here's my brief summary of the book's description:

Your program should behave like shown below (remember that "bash-2.04$" is the Unix prompt; your program does not output this)

Compilation and Sample Input/Output on Unix:

bash-2.04$ aCC -AA lab2.cpp
bash-2.04$ a.out
Enter the following information about your checking account.
Beginning balance: $1000
Number of checks written: 50

The bank fee this month is $13.00

bash-2.04$ a.out
Enter the following information about your checking account.
Beginning balance: $405.25
Number of checks written: 5

The bank fee this month is $10.50

bash-2.04$ a.out
Enter the following information about your checking account.
Beginning balance: $100.05
Number of checks written: 100

The bank fee this month is $29.00

bash-2.04$ a.out
Enter the following information about your checking account.
Beginning balance: $-5
Number of checks written: -10

Your account is overdrawn!
Number of checks must be zero or more.
bash-2.04$

Rules