Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/insta1.bnk
There are 2 other files named insta1.bnk in the archive. Click here to see a list.
2' NAME--INSTALL1
4'
6' DESCRIPTION--CALCULATES THE MONTHLY PAYMENTS SCHEDULE FOR 
7' AN INSTALLMENT LOAN AND PRINTS THIS SCHEDULE IN THE FORMAT OF
8' A LOAN STATEMENT.
10'
12' SOURCE--REVISED 8/8/69 BY J. ROKUS
14'
16' INSTRUCTIONS--ENTER INFORMATION FOR INSTALLMENT LOANS 
17' BEGINNING IN LINE 1090.
18'
20' THIS PROGRAM WAS WRITTEN FOR STUDENT USE AT AMOS TUCK SCHOOL
21' OF HANOVER,N.H., WHICH DOES NOT ASSUME RESPONSIBILITY FOR
22' ITS ACCURACY.
24'
26' * * * * * * * * * * * MAIN PROGRAM * * * * * * * * * * * * 
28'
32 DEF FNP(N9)
34 LET C2=1
36 IF N9=0 THEN 86
38 LET P9=0
40 LET C9=INT(N9*100+.5)
42 LET F9=INT(C9/100)
44 LET R9=C9-100*F9
46 LET T9=INT(F9/10)
48 LET P9=P9+1
50 LET T9=INT(F9/10)
52 LET O(P9)=F9-10*T9+48
54 LET F9=T9
56 IF F9>0 THEN 48
58 LET O(0)=P9+3
60 LET O(P9+1)=46
62 LET O(P9+2)=INT(R9/10)
64 LET O(P9+3)=R9-O(P9+2)*10+48
66 FOR I9=1 TO P9/2
68 LET T9=O(I9)
70 LET O(I9)=O(P9+1-I9)
72 LET O(P9+1-I9)=T9
74 NEXT I9
76 LET O(P9+2)=O(P9+2)+48
78 CHANGE O TO Q$
80 PRINT Q$;
82 LET FNP=C9/100
84 GO TO 88
86 PRINT"   0";
88 FNEND
110 REM CALCULATES PAYMENTS FOR AN INSTALLMENT LOAN
120 DIM C$(12) 'MONTHS OF THE YEAR'
130 MAT READ C$(12)
140 READ G$
150 IF G$="FINISH" THEN 9999
160 READ G1$,G2$
170 READ B,B1,C,A,I,R,R1,M
175 LET C3=C
177 LET C8=1
180 IF R<1 THEN 210 'CHECKS FOR FEE RATHER THAN RATE'
190 LET A5=R
200 GO TO 230
210 LET A5=(A+I)*R*M/12
220 LET T=(I+A+A5)/M 'MONTHLY PAYMENT
230 IF T*100=INT(T*100) THEN 290
240 LET T=INT(T*100+1)/100
250 IF R<1 THEN 280
260 LET A1=R
270 GO TO 290
280 LET A1=T*M-A-I 'TOTAL PAYMENTS
290 IF A1*100=INT(A1*100) THEN 310
300 LET A2=INT((A1*(I/(A+I)))*100+.5)/100
310 LET D=A1
320 LET E=I
330 PRINT
340 PRINT
350 PRINT TAB(15);"INSTALLMENT LOAN STATEMENT"
360 PRINT TAB(15);"--------------------------"
370 PRINT
380 PRINT G$
390 PRINT G1$
400 PRINT G2$
410 PRINT
420 PRINT"AMOUNT OF LOAN";TAB(26);
421 LET A=FNP(A)
422 PRINT
430 PRINT"INTEREST";TAB(26);
431 LET A1=FNP(A1)
432 PRINT
440 PRINT"INSURANCE";TAB(26);
441 LET I=FNP(I)
442 PRINT
450 PRINT TAB(26);"--------"
460 PRINT"FACE AMOUNT OF THE NOTE";TAB(26);A+A1+I
470 PRINT
480 IF R<1 THEN 510
490 PRINT"FINANCING FEE"R
500 GO TO 520
510 PRINT"ADD ON INTEREST RATE"R
520 PRINT "EFFECTIVE ANNUAL RATE "R1
530 PRINT "DATE OF LOAN IS  "C$(B);" ";B1;",";C+1900
540 PRINT"MONTHS TO MATURITY"M
550 PRINT"MONTHLY PAYMENT   $";
551 LET T=FNP(T)
552 PRINT
560 PRINT
570 PRINT TAB(0);"DATE";TAB(15);"BALANCE";TAB(30);"PAYOFF";
580 PRINT TAB(50);"INTEREST"
590 PRINT TAB(0);"DUE";TAB(15);"REMAINING";TAB(30);"BALANCE";
600 PRINT TAB(50);"PAID"
610 PRINT TAB(0);"----";TAB(15);"-------";TAB(30);"-------";TAB(50);"------"
670 LET Z=B+1
680 LET B5=A1+A+I
690 LET C1=12-B
700 LET C=C+1900
710 PRINT TAB(0);C
720 PRINT
730 PRINT TAB(0);C$(B);" ";B1;TAB(15);
735 LET B5=FNP(B5)
738 PRINT TAB(30);
740 LET A=FNP(A)
742 PRINT TAB(50);"NONE"
750 FOR J=1 TO M 'CALCULATION & PRINTING MONTHLY TABLE
760 LET P=((M-J+1)/(((M+1)/2)*M))*A1
770 LET P=INT(P*100+.5)/100
775 LET S(C8)=S(C8)+P
780 LET F=((M-J+1)/(((M+1)/2)*M))*I
790 LET F=INT(F*100+.5)/100
800 IF J<M THEN 830
810 LET P=D
820 LET F=E
830 LET A=A-(T-P-F)
840 LET A=INT(A*100+.5)/100
850 LET B7=B5 'FINAL MONTHLY PAYMENT
860 LET B5=INT((B5-T)*100+.5)/100
870 IF J<M THEN 890
880 LET B5=A=0
890 LET D=INT((D-P)*100+.5)/100
900 LET E=INT((E-F)*100+.5)/100
910 PRINT TAB(0);C$(Z);" ";B1;TAB(15);
912 LET B5=FNP(B5)
914 PRINT TAB(30);
916 LET A=FNP(A)
918 PRINT TAB(50);
928 LET P=FNP(P)
929 PRINT
930 IF J=M THEN 1030 'CHECK FOR END OF A CALENDAR YEAR
940 LET Z=Z+1
950 IFJ<C1 THEN 1030
960 IF J>C1 THEN 980
970 GO TO 990
980 IF Z<13 THEN 1030
990 LET Z=1
1000 LET C=C+1
1005 LET C8=C8+1
1010 PRINT
1020 PRINT TAB(0);C
1025 PRINT
1030 NEXT J
1040 PRINT
1050 IF R<1 THEN 1064
1060 PRINT"FINAL MONTHLY PAYMENT IS  ";
1061 LET B7=FNP(B7)
1064 PRINT
1066 FOR J=1 TO C8
1067 PRINT
1068 PRINT"TOTAL INTEREST PAID IN ";(C3+1900+J-1);" IS ";
1069 LET S(J)=FNP(S(J))
1071 PRINT
1072 NEXT J
1075 DATA JAN,FEB,MAR,APR,MAY,JUNE,JULY
1080 DATA AUG,SEPT,OCT,NOV,DEC
1090 DATA"WILLIAM SMITH","99 LEBANON ST","HANOVER, N. H."
1100 DATA 6,15,68,1500,31.91,.06,.11,12
9990 DATA "FINISH"
9991 PRINT""
9995 GO TO 140
9999 END