Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   can anybody help me with writing this program?It calculates compound interest (http://www.go4expert.com/forums/help-writing-programit-calculates-t16138/)

 kloyt 11Feb2009 02:46

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 interst).
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 interst 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 interst 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.

 kloyt 11Feb2009 03:03

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

Tomorow I will post my best try on the issue :)

 cpulocksmith 11Feb2009 03:33

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

well see whos is better ^^

 xpi0t0s 11Feb2009 18:27

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

The assignment sounds easy enough so have a go at it and when you're stuck let us know and we will see if we can help. Try to keep any posted code down to a minimum.

 kloyt 12Feb2009 00:20

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

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

 shabbir 12Feb2009 09:05

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

Quote:
 Originally Posted by kloyt (Post 42796) Actually I think I passed the test for which I needed the program written so.... But thanks anyway :)
Congrats.

 freddie 20Jun2009 23:31

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

Hello:

Have you got the program in C for calculation of compound interest?
I badly need this. Assume that the principal amount is 10,000 at 10% per annum. The output should be like this:

Year Interest Balance
2000 0 10000
2001 1000 11000
2002 1100 12100

Regards,
Freddie

Quote:
 Originally Posted by kloyt (Post 42743) 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 interst). 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 interst 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 interst 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.

 shabbir 21Jun2009 08:46

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