1 REM NPV  
5 CLEAR  1000  
10 CLS  
20 PRINT  TAB(10); "NET PRESENT VALUE OF PROJECT":PRINT   
30 PRINT "MOST INVESTMENT PROJECTS INVOLVE SOME INITIAL COST AND THEN  
35 PRINT "INFLOWS AND OUTFLOWS IN THE FUTURE UNTIL SOME TIME WHEN  
40 PRINT "WHEN THE INVESTMENT IS TERMINATED. BASED UPON THE RISK IN THE  
45 PRINT "ORIGINAL INVESTMENT THE INVESTOR SHOULD HAVE SOME REQUIRED  
50 PRINT "RATE OF RETURN HE/SHE DESIRES TO EARN FROM THE INVESTMENT.  
55 PRINT "IF THE PRESENT VALUE OF THE CASH FLOWS FROM THE PROJECT  
60 PRINT "ARE POSITIVE WHEN USING THE REQUIRED RATE AS THE DISCOUNT RATE  
65 PRINT "THEN THE PROJECT IS A REASONABLE ONE TO INVEST IN.THIS  
70 PRINT "PROGRAM COMPUTES THE PRESENT VALUE OF SUCH A PROJECT. IF THE  
75 PRINT "USER SETS THE INITIAL INVESTMENT EQUAL TO 0 THEN THE PRESENT  
80 PRINT "VALUE EQUALS THE MAXIMUM AMOUNT TO BE PAID INITIALLY FOR THE  
85 PRINT "PROJECT."  
90 PRINT :INPUT "PRESS ENTER TO BEGIN";Z9$  
100 CLS  
110 DIM  A(200)  
115 PRINT "INPUT FOR NEW PROJECT":PRINT   
120 INPUT "INPUT REQUIRED RATE OF RETURN (%) ";R:R=R/100:PRINT   
125 IF R = 0 THEN END
130 INPUT "INITIAL CASH COST OF PROJECT      ";A(0):A(0)=-A(0)  
140 I=1  
150 PRINT "ENTER CASH FLOW FOR PERIOD ";I;" (-.01 TO END)";:INPUT  A(I)  
160 IF  A(I)=-.01  THEN  I=I-1:GOTO  200  
170 I=I+1:GOTO  150  
200 REM COMPUTATION  
205 PRINT   
210 NPV=0  
220 FOR  J=0  TO  I  
230 NPV=NPV + A(J)/(1+R)[J  
240 NEXT   
260 PRINT  "NET PRESENT VALUE AT";100*R;"% INTEREST EQUALS ";:PRINT USING  "$$########";NPV  
270 INPUT "DO YOU WANT ANOTHER NPV FOR SAME CASH FLOWS BUT CHANGING        INTEREST RATE (Y/N) ";Z9$  
280 IF  Z9$<>"Y"  AND  Z9$<>"N"  THEN  GOSUB  10000:GOTO  270  
290 PRINT   
300 IF  Z9$="N"  THEN  CLS: GOTO  115  
310 INPUT "ENTER NEW REQUIRED RATE ";R:R=R/100  
320 GOTO  205  
10000 PRINT "INPUT ERROR! TRY AGAIN!":FOR  K=1 TO 300:NEXT :RETURN   

