1. ## Finance Help

Hey everyone,

Need a lot of help on this one...this is for a computer class I'm taking and I have to write a program. I wrote it, it works, BUT my math definitely wrong. Can someone help me by posting the various scenarios listed below? The variables that are need are: minimum balance, current balance, interest1,2,3.
Also, the savings account part should have two possibilities, and the checking should (I think) have three.

HELP!!!!!

A bank in your town updates its customers' accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every customer must maintain a minimum balance. If a customer balance falls below the minimum balance, there is a service charge of $10.00 for savings accounts and$25.00 for checking accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows:

a) Savings accounts receive 4% interest.

b) Checking accounts with balances of up to $5000 more than the minimum balance receive 3% interest; otherwise, the interest is 5% 2. Originally Posted by harold Hey everyone, Need a lot of help on this one...this is for a computer class I'm taking and I have to write a program. I wrote it, it works, BUT my math definitely wrong. Can someone help me by posting the various scenarios listed below? The variables that are need are: minimum balance, current balance, interest1,2,3. Also, the savings account part should have two possibilities, and the checking should (I think) have three. HELP!!!!! A bank in your town updates its customers' accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every customer must maintain a minimum balance. If a customer balance falls below the minimum balance, there is a service charge of$10.00 for savings accounts and $25.00 for checking accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows: a) Savings accounts receive 4% interest. b) Checking accounts with balances of up to$5000 more than the minimum balance receive 3% interest; otherwise, the interest is 5%
If I understand this correctly I think the following covers what you describe:

Code:
function EndOfMonthProc(balance, type, MinBalance)
if type==savings
if balance<MinBalance
newbalance=balance-10;
else
newbalance=1.04*balance;
endif
endif

if type==checking
if balance<MinBalance
newbalance=balance-25;
else
if balance<MinBalance+5000
newbalance=1.03*balance;
else
newbalance=1.05*balance;
endif
endif
endif

return newbalance
endfunction
Though I have my doubts about the interest rates, I would have thought they
should be annual rates paid monthly in which they should be:

1+0.04/12, 1+0.03/12, and 1+0.05/12.

RonL

3. Hi CB,

Thanks! The last part of the question is the following:

"Write a program that reads a customer's account number (int type), account type (char; s for savings, c for checking), minimum balance that the account should maintain, and current balance. The program should then output the account number, account type, current balance, and an appropriate message."

I don't think we can you a new variable for the new balance--(I think they mean new "current" balance)??

This is what I originally had:

For savings:
if Balance < 1000
Balance = Balance - 10.00
else Balance = Balance * .04 + Balance

For checking:
if Balance < 1000
Balance = Balance - 25.00
if Balance < 5000)
Balance = Balance * .03 + Balanace
if Balance > 5000
Balance = Balance * .05 + Balance

I knew something had to be wrong with these since I never used the minimum balance variable I had declared.
They also suggest testing w/ the data: 123456 S 1000 2700 (account #, account type, minimum balance, current balance)

4. Originally Posted by harold
Hi CB,

Thanks! The last part of the question is the following:

"Write a program that reads a customer's account number (int type), account type (char; s for savings, c for checking), minimum balance that the account should maintain, and current balance. The program should then output the account number, account type, current balance, and an appropriate message."

I don't think we can you a new variable for the new balance--(I think they mean new "current" balance)??
It looks like you are using a "C" like language here. I don't think there
can be a restriction on using extra local variables, but if that's what
you are working to OK. Essentially my "newbalance" can be replaced by
balance.

This is what I originally had:

For savings:
if Balance < 1000
Balance = Balance - 10.00
else Balance = Balance * .04 + Balance

For checking:
if Balance < 1000
Balance = Balance - 25.00
if Balance < 5000)
Balance = Balance * .03 + Balanace
if Balance > 5000
Balance = Balance * .05 + Balance

I knew something had to be wrong with these since I never used the minimum balance variable I had declared.
They also suggest testing w/ the data: 123456 S 1000 2700 (account #, account type, minimum balance, current balance)
You seem to have hardcoded 1000 in where you should be using the
minimum balance, also the cut off between low and high interest rate
on checking account should be 5000 more than the minimum balance.

RonL