10 PRINT "TERM OF A LOAN"
20 PRINT 
29 REM - STATEMENTS 30 TO 100 REQUEST USER INPUT
30 PRINT "REGULAR PAYMENT";
40 INPUT R
50 PRINT "PRINCIPAL";
60 INPUT P
70 PRINT "ANNUAL INTEREST RATE";
80 INPUT I 
90 PRINT "NUMBER OF PAYMENTS PER YEAR";
100 INPUT N
108 REM - CALCULATE TERM IN YEARS BY FORMULA;
109 REM - INTEREST CONVERTED FROM PERCENT TO DECIMAL FOR CALCULATION
110 Y=-(LOG(1-(P*(I/100))/(N*R))/(LOG(1+I/100/N)*N))
119 REM - ROUND OFF TO NEAREST TENTH, PRINT
120 PRINT "TERM =";INT(Y*10+.5)/10;"YEARS"
130 PRINT 
139 REM - RESTART OR END PROGRAM?
140 PRINT "MORE DATA? (1=YES, 0=NO)";
150 INPUT X
160 IF X=1 THEN 20
170 END
