home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / scieqs14.zip / EXAMPLE2 < prev    next >
Text File  |  1988-10-18  |  650b  |  24 lines

  1. !echo
  2. ; This example file shows how to solve compound interest problems.
  3. ;
  4. ; The compound interest formula is
  5. ;
  6. ;      future_value = present_value * (1 + interest_rate) ^ n
  7. ;
  8. ; First create a user-defined function for future value
  9.  
  10. fv(pv,i,n) = pv * (1 + i) ^ n
  11.  
  12. ; Now you can use this function to compute future values with
  13. ; different parameter values.
  14.  
  15. ; If $1000.00 is invested at 7% interest compounded annually, what
  16. ; will be the value at the end of eight years?
  17.  
  18. future_value = fv(1000.00, 0.07, 8)
  19.  
  20. ; The answer is displayed and also stored in the variable future_value
  21. ; for later use in other expressions.
  22.  
  23. !noecho
  24.