Thread: Loan Table

  1. #1
    Unregistered
    Guest

    Question Loan Table

    Does anyone have any code that have worked on that computed a loan using a nested for loop. Here is a sample of what I am trying to accomplishhere is some sample output with the principal or loan
    amount at 10,000 at 7% for 5 years.

    monthly payment 198.01

    year balance amtpaid interest paid


    1 8269.02 2376.14 645.16
    2 6412.91 4752.29 1165.20
    3 4422.62 7128.43 1551.05
    4 2288.45 9504.58 1793.02
    5 0.00 11880.72 1880.72

    any help would be great.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    describe what you know about compound interest. then show how you would transpose that formula into c.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Unregistered
    Guest
    Here are the two formulas that I was given

    mp = Pr / (1-1/(1+r)raised N)

    mp = monthly payment
    p = princiapl
    r= monthly rate of interest
    n= months

    also

    bN = P(1+r)raised N - mp((1+r)raisedN - 1)r

    bN is the balance of the principal after N months

    also I am trying to calculate (1+r)raised N using the pow function.

    I hope that helps

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't stop my program at zero (Loan Table)
    By beachsidefl321 in forum C Programming
    Replies: 10
    Last Post: 06-24-2009, 09:14 PM
  2. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  3. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  4. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM
  5. help with operator <
    By kashifk in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2003, 03:49 PM