Here is an example of how you can program your Sharp EL-5250 programmable calculator to calculate the NPV value when given yearly cash inflows.
Print"INITIAL CASH FLOW
Input C
Print "NO. OF YRS
Input N
Print"INTEREST
Rem IF I=12% NEED TO INPUT AS 0.12
Input I
Rem TIME COUNTER
T=1
Rem KEEPS THE CURRENT VALUE
X=0
Label CHECK
If T<=N Goto NPV
If T>N Goto THEEND
Label NPV
Print"NEXT CASH FLOW
Input F
X=X+(F/(1+I)^T)
T=T+1
Goto CHECK
Label THEEND
Rem NEED TO SUBTRACT INITIAL CASH FLOW
X=X-C
Rem X IS NOW THE NPV
Print X
End
No comments:
Post a Comment