# Thread: can anybody help me with writing this program?It calculates compound interest

1. ## can anybody help me with writing this program?It calculates compound interest

Hey guys.I really need some advice with writing a program in c that will do the tasks below.Any help is greatly appreciated.

A bank gives 3% for deposits under 15000 and 5% for deposits over 15000.The interest is added to the principal in the end of every year (compound interest).
Write a program in C which will want you to enter first the amount you would like to deposit and then the time (in years) for which you want to deposit your money.For every year then the program should calculate the interest and the total sum(principal +interest).
In the end the program should write ina new file accounts.txt the initial deposit and then from below in two columns,for every year the interest and the total sum(principal+interest).In the end the program should write the sum of all the interest accrued from all of the years of the deposit.
Note:The program should check every year in which interest category (3% or 5%) is the deposit depending on the amount.

2. So, what have you done so far?

Yes, we can HELP you. We are not going to do the work for you.

--
Mats

3. Ok I got the idea.Tomorrow I will post my best try

4. We'll be waiting

5. Actually I think I passed the test for which I needed the program written so....
But thanks anyway