10 PRINT "PRINCIPAL ON A LOAN"
20 PRINT
29 REM - STATEMENTS 30 TO 100 REQUEST USER INPUT
30 PRINT "REGULAR PAYMENT";
40 INPUT R
50 PRINT "TERM IN YEARS";
60 INPUT Y
70 PRINT "ANNUAL INTEREST RATE";
80 INPUT I
90 PRINT "NUMBER OF PAYMENTS PER YEAR";
100 INPUT N
108 REM - CALCULATE AMOUNT OF PRINCIPAL BY FORMULA;
109 REM - INTEREST CONVERTED FROM PERCENT TO DECIMAL FOR CALCULATIONS
110 P=R*N*(1-1/((I/100)/N+1)[(N*Y))/(I/100)
119 REM - ROUND OFF TO NEAREST CENT, PRINT
120 PRINT "PRINCIPAL = $";INT(P*100+.5)/100
129 REM - PRINT BLANK LINE TO SEPARATE DATA FROM QUESTION
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
