Sams Teach Yourself C in 21 Days

(singke) #1

TYPE& RUN 6 Calculating Mortgage Payments


This Type & Run is called “Mortgage,” and as the name suggests, it can calcu-
late the payments on a mortgage or any other type of loan. When you run this
program, it prompts you for the following three pieces of information:


  • Amount: How much you’re borrowing (also called the principal).

  • Annual interest rate: The amount of interest charged per year. You need to
    enter the actual rate, so for 8[171] percent you enter 8.5. Do not adjust
    for the actual numerical value (0.085 in this case), because the program
    does this for you.

  • The loan duration, or term, in months: This is the number of months over
    which you will be paying off the loan.
    After you type in and run this program, you’ll be able to calculate payments on
    mortgages and other types of loans.


31 448201x-T&R6 8/13/02 11:19 AM Page 561

Free download pdf