2 PRINT TAB(30);"INTEREST"
4 PRINT
8 PRINT
9 PA=0
10 REM -PROGRAM TO COMPUTE INTEREST PAYMENTS
20 PRINT "INTEREST IN PERCENT";
25 INPUT J
26 J=J/100
30 PRINT "AMOUNT OF LOAN";
35 INPUT A
40 PRINT "NUMBER OF YEARS";
45 INPUT N
50 PRINT "NUMBER OF PAYMENTS PER YEAR";
55 INPUT M
60 N=N*M
65 I=J/M
70 B=1+I
75 R=A*I/(1-1/B^N)
78 PRINT
80 PRINT "AMOUNT PER PAYMENT=";INT(R*100)/100
85 PRINT "TOTAL INTEREST =";INT((R*N-A)*100)/100
90 B=A
95 PRINT "PAYMENT NO.";TAB(15);"INTEREST";TAB(30);"PRINCIPAL";TAB(45);"BALANCE"
100 L=B*I
110 P=R-L
120 B=B-P
122 L=INT(L*100)/100
124 P=INT(P*100)/100
126 B=INT(B*100)/100
128 PA=PA+1
130 PRINT PA;TAB(15);"$";L;TAB(30);"$";P;TAB(45);"$";B
140 IF B>=R THEN 100
150 PRINT TAB(30);"$";INT((B*1)*100)/100;TAB(45);"$";INT((R-B*I)*100)/100
155 PRINT
160 PRINT PA+1;"LAST PAYMENT =";TAB(30);"$";INT((B*I+B)*100)/100
170 PRINT
180 PRINT
190 PRINT
200 END