C++ - Checkbook Problem
Posted on 2006-10-26
This is the second problem I need to figure out that is needed by tomorrow.
After many years of being frustratedby a check book that just won't balance you decide to make a program that does it for you. The program should display a list of choices: D for deposit, C for check, W for withdrawal, and Q for quit. If D is selected ask for the amount of the deposit, and add it to the account balance. If the user enters C, ask for the amount of the check and subtract it from the balance. If the user enters a W, ask for the amount of the withdrawal and subtract it from the balance. When the user enters a Q, the program should display the opening balance, total amount deposited, total amount withdrawn, total amount of the checks and the final balance. If the user enters something other than D, W, C, or Q, the program should display an error message and redisplay the menu. Allow the user to enter either upper or lower case letters.
Here's the sample pseudocode to help with the program code.
total_balance to 0
total_checks to 0
total_withdrawals to 0
total_deposits to 0
get starting balance
do ... while loop
prompt for type of transaction
end do while loop as Q was pressed
Display summary data
Thanks for being there. This will help pull my ass out of the fire.