home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util2
/
scieqs11.lzh
/
EXAMPLE2
< prev
next >
Wrap
Text File
|
1988-10-18
|
650b
|
24 lines
!echo
; This example file shows how to solve compound interest problems.
;
; The compound interest formula is
;
; future_value = present_value * (1 + interest_rate) ^ n
;
; First create a user-defined function for future value
fv(pv,i,n) = pv * (1 + i) ^ n
; Now you can use this function to compute future values with
; different parameter values.
; If $1000.00 is invested at 7% interest compounded annually, what
; will be the value at the end of eight years?
future_value = fv(1000.00, 0.07, 8)
; The answer is displayed and also stored in the variable future_value
; for later use in other expressions.
!noecho