1 REM PVAL
5 CLS
10 PRINT"                 PRESENT VALUE"
20 PRINT
30 PRINT"THIS PROGRAM WILL COMPUTE THE PRESENT VALUE OF A SINGLE
40 PRINT"AMOUNT , A ,TO BE OBTAINED AFTER N EQUAL TIME PERIODS, WITH
50 PRINT"INTEREST COMPOUNDED AT A RATE OF I% pER PERIOD.
55 PRINT "BE SURE TO INPUT INTEREST RATE AS A PER CENT. CONVERSION
57 PRINT "TO DECIMAL FORM IS DONE IN THE PROGRAM.
60 PRINT:PRINT"   INTEREST RATES MAY BE QUOTED AS ANNUAL RATES IF THE
70 PRINT"NUMBER OF COMPOUNDINGS PER YEAR ARE KNOWN.":PRINT
90 INPUT "PRESS ENTER TO BEGIN ";Z9
99 REM
100 CLS:INPUT"ARE INTEREST RATES QUOTED ANNUALLY(Y/N)";Z9$
103 IF Z9$<>"Y" AND Z9$<>"N" THEN GOTO 100
105 IF Z9$="Y" THEN GOSUB 500
110 INPUT "INTEREST RATE ,i,PER PERIOD= ";I
112 INPUT "AMOUNT TO BE OBTAINED (A)  = ";A
115 I=I/100
120 INPUT "NUMBER OF PERIODS          = ";N
130 PV = A*(1+I)[(-N)
140 PRINT
150 PRINT "PRESENT VALUE              =";PV
190 PRINT
200 INPUT "FOR ADDITIONAL TRIALS PRESS 1,ELSE PRESS 0";Z8
210 IF Z8 = 1 GOTO 99
220 IF Z8 = 0 THEN END
230 PRINT "INPUT ERROR. TRY AGAIN. "
240 FOR L= 1 TO 300:NEXT L
250 GOTO 200
500 REM COMPUTATION FOR ANNUAL DATA
510 PRINT:INPUT"ANNUAL INTEREST RATE IN %";I1
520 INPUT"NUMBER OF COMPOUNDINGS ANNUALLY";N1
530 I=I1/N1
540 PRINT:PRINT"INTEREST RATE PER PERIOD = ";I;"%"
550 FOR J=1 TO 1000:NEXT :CLS:RETURN
