10 PRINT "REMAINING BALANCE ON A LOAN"
20 PRINT
30 PRINT "REGULAR PAYMENT"
40 INPUT R
50 PRINT "PRINCIPAL"
60 INPUT P
70 PRINT "# OF PAYMENTS PER YEAR";
80 INPUT N
90 PRINT "ANNUAL INTEREST RATE";
100 INPUT I
110 I=I/100
120 PRINT  "NUMBER OF PAYMENTS MADE";
130 INPUT N1
150 B0=P
160 FOR J1=1 TO N1
170 I1=INT((B0*I/N)*100+O.5)/100
180 A=R-I1
190 B0=B0-A
200 NEXT J1
210 PRINT "REMAINING BALANCE = $";
220 PRINT INT(B0*100+O.5)/100
230 PRINT
240 PRINT "MORE DATA? (1=YES, 0=NO)";
250 INPUT X
260 IF X=1 THEN 20
270 END