home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / KATCAL13.ZIP / K0000011.PGM < prev    next >
Text File  |  1990-05-13  |  870b  |  33 lines

  1. * This program takes the following user inputs:
  2. *   Principle -> R19
  3. *   Yearly interest rate -> R18
  4. *   # of compunds/year -> R17
  5. *   # of years -> R16
  6. * and returns the amount of money accured
  7. *
  8. * The formula is:
  9. *   A = P(1 + r/n)^nt
  10. *   A = R19*( 1 + R18 / R17) ^ R17*R16
  11. :Begin
  12.    WD Welcome to the Compound Interest Calculator!
  13.    WD Enter your principle
  14.    RD r19
  15.    WD Enter the yearly interest rate
  16.    RD r18
  17.    WD Enter the number of compounds per year
  18.    RD r17
  19.    WD Enter the number of years your principle is invested
  20.    RD r16
  21. * R15 will have the power to raise to  
  22.    MOV   r15, r17
  23.    MUL   r15, r16
  24.   * R14 will have the base adder
  25.    MOV   r14, r18
  26.    DIV   r14, r17
  27.  * R13 will have the base quantity
  28.    MOV r13, 1
  29.    ADD r13, r14
  30.    POW   r13,r15
  31.    mul   r19, r13
  32.    WD   Your amount at this rate will be:
  33.    WD r19