10 CLS
20 KEY OFF
30 DEFDBL A-Z:DEFINT N,J
40 PRINT "PRESENT VALUE OF AN INTEREST TAX DEDUCTION"
50 PRINT
60 PRINT "WHAT IS THE TAX RATE (%) ";
70 INPUT T
80 T=T/100
90 PRINT " ENTER INTEREST RATE (%) ";
100 INPUT K
110 K=K/100
120 PRINT "   NUMBER OF PERIODS     ";
130 INPUT N
140 P=0
150 PRINT "     INTEREST AMOUNT IN DOLLARS"
160 FOR J=1 TO N
170 PRINT USING SPACE$(12)+"FOR PERIOD ##"; J;
180 INPUT Z
190 P=P+Z*T/(1+K)^J
200 NEXT J
210 PRINT
220 PRINT "PRESENT VALUE OF DEDUCTION =";
230 PRINT USING "$$#,###,###.##"; P
240 PRINT
250 PRINT "WOULD YOU LIKE TO RE-RUN THIS PROGRAM";
260 PRINT " WITH NEW DATA (Y/N)?"
270 Z$=INKEY$:IF Z$="" THEN 270
280 IF Z$="Y" OR Z$="y" THEN 50
290 IF Z$<>"N" AND Z$<>"n" THEN 250
300 END