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

Discussion in 'C' started by kloyt, Feb 10, 2009.

  1. kloyt

    kloyt New Member

    Joined:
    Feb 10, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. kloyt

    kloyt New Member

    Joined:
    Feb 10, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Tomorow I will post my best try on the issue :)
     
  3. cpulocksmith

    cpulocksmith New Member

    Joined:
    Jul 23, 2008
    Messages:
    289
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    student
    Location:
    canada
    well see whos is better ^^
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     
  5. kloyt

    kloyt New Member

    Joined:
    Feb 10, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Actually I think I passed the test for which I needed the program written so....
    But thanks anyway :)
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Congrats.
     
  7. freddie

    freddie New Member

    Joined:
    Jun 20, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Accountant
    Location:
    Jeddah, Saudi Arabia
    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

    Please help.

    Regards,
    Freddie


     
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    freddie, you already have thread for this also and so do not jump into any thread with your queries.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice