C++/bank account program in C
Expert: vijayan - 8/13/2008
Questionhello could you help me in developing my program in C language ? here are the things needed:
Bank Account Problem
1. Create a bank account for a maximum of 10 persons.
2. Each account has these information
a. Name
b. Account number
c. Balance
d. Address
3. Allow each user to
a. Deposit
b. Withdraw
c. Check balance
4. Create a receipt of all the transactions
I'm not asking you to make the program, i just want you to help me like give the structure or format that i can follow and and some hints to make it easier for me because i just recently started making programs and i don't know where to start. in fact I'm already confused with it and i badly need help because this program is required in one of my subjects. thanks in advance
Answer1. define a struct bank_account to hold the information about an account in one place.
2. create an array of bank_account of size 10
3. define an int to keep track of the number of accounts.
4. in a loop,
display a menu and accept user choice.
if 'Q' quit, we're done
if 'C' create account:
if number of accounts is 10,
print an error message
back to beginning of loop
else
accept account information from the user
set the values in the appropriate account in the array.
increment number of accounts
back to beginning of loop
if 'D' deposit
get account number from user
locate account with this number in array.
if not found, print an error message
else, get positive amount, process request, print receipt
back to beginning of loop
...
and so on for other requests