Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0020/accrua.bnk
There are 2 other files named accrua.bnk in the archive. Click here to see a list.
2' NAME--ACCRUAL
4'
6' DESCRIPTION--COMPUTES AND PRINTS THE ACCRUED INTEREST ON 
7' INSTALLMENT LOANS
8'
10' SOURCE--REVISED 8/8/69 BY J. ROKUS
12'
14' THIS PROGRAM WAS WRITTEN FOR STUDENT USE AT AMOS TUCK SCHOOL 
16' OF HANOVER, N.H., WHICH DOES NOT ASSUME RESPONSIBILITY FOR
18' ITS ACCURACY.
20'
22' * * * * * * * * * * * * MAIN PROGRAM * * * * * * * * * * * * * 
24'
30 DIM C$(12)
40 REM FUNCTION TO PRINT RESULTS IN DOLLARS AND CENTS FORMAT
50 REM AND TO ALIGN DECIMAL POINTS
60 DEF FNP(N9)
70 IF N9=0 THEN 420
80 LET P9=0
90 LET C9=INT(N9*100+.5)
100 LET F9=INT(C9/100)
110 LET R9=C9-100*F9
120 LET P9=P9+1
130 LET T9=INT(F9/10)
140 LET O(P9)=F9-10*T9+48
150 LET F9=T9
160 IF F9>0 THEN 120
170 LET O(0)=P9+3
180 LET O(P9+1)=46
190 LET O(P9+2)=INT(R9/10)
200 LET O(P9+3)=R9-O(P9+2)*10+48
210 FOR I9= 1 TO P9/2
220 LET T9=O(I9)
230 LET O(I9)=O(P9+1-I9)
240 LET O(P9+1-I9)=T9
250 NEXT I9
260 LET O(P9+2)=O(P9+2)+48
270 CHANGE O TO Q$
280 LET U9=0
290 LET U9=U9+1
300 IF U9=O(0) THEN 370
310 IF O(U9)<>46 THEN 290
320 FOR V9= 1 TO 7-U9
330 LET P(V9)=32
340 NEXT V9
350 LET P(0)=V9
360 CHANGE P TO M$
370 CHANGE O TO Q$
390 PRINT M$"$"Q$;
400 LET FNP=C9/100
410 GOTO 430
420 PRINT"     $0.00";
430 FNEND
440 
450 MAT READ C$(12)
460 PRINT"WHAT IS THE CURRENT MONTH AND YEAR (E.G. 5,1969)";
470 INPUT A,A1
480 IF A1>99 THEN 500
490 LET A1=A1+1900
500 PRINT""
510 LET N=12-A+1
520 LET Z=A
530 PRINT TAB(12) "EARNED INTEREST -  INSTALLMENT LOANS"
540 PRINT TAB(12) "------------------------------------"
550 PRINT "MONTH OF" TAB(20) "EARNED" TAB(40) "REMAINING UNEARNED"
560 PRINT "MATURITY" TAB(20) "INTEREST" TAB(40) "INTEREST"
570 PRINT "--------" TAB(20) "--------" TAB(40) "------------------"
575 PRINT
580 PRINT A1
590 FOR J=1 TO N+60 'MAXIMUM MATURITY 5 YEARS'
600 READ P
610 LET S=INT(P*(2/(J+1))*100+.5)/100'FORMULA FOR SUM OF MONTHS DIGITS
620 LET T=T +S
630 LET R=P-S
640 LET R1=R1+R
650 PRINT " " C$(Z); TAB(18);
660 LET S=FNP(S)
670 PRINT TAB(40);
680 LET R=FNP(R)
690 PRINT
700 LET Z=Z+1
710 IF J=72+N THEN 800
720 IF J<N THEN 800
730 IF J>N THEN 750
740 GO TO 760
750 IF Z<13 THEN 800
760 LET Z=1
770 LET A1=A1+1
780 PRINT
785 IF J=N+60 THEN 800
790 PRINT A1
800 NEXT J
810 PRINT TAB(20) "--------" TAB(42) "--------"
820 PRINT "TOTALS";TAB(18);
830 LET T=FNP(T)
840 PRINT TAB(40);
850 LET R1=FNP(R1)
860 PRINT
870 DATA JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST
880 DATA SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER
890 
900 REM ENTER TOTAL UNEARNED INTEREST IN DATA STARTING AT LINE 1000
910 REM FOR EACH MONTH OF MATURITY IN CHRONOLOGICAL ORDER.
1000 DATA 27.77,56.29
1010 DATA 2.65,193.42,362.4,609.55,832.39,936.14
1020 DATA 654.66,1146.61,1521.3,1226.52,2083.25,2455.6
1030 DATA 1350.4,1597.11,2537.63,2362.95,5755.1,5203.83
1040 DATA 4856.7,5819.73,2490.84,3283.03,4817.39,1927.29
1050 DATA 1867.08,2090.91,3912.03,7773.25,5414.98,11028.33
1060 DATA 4660.57,7371.53,2572.17,3190.66,3712.78,927.05
1070 DATA 0,0,790.34,360.38,0,844.86
1080 DATA 0,0,898.64,0,0,426.69
1090 DATA 0,271.43,0,0,0,0
1100 DATA 0,0,0,0,601.55,0
1110 DATA 0,0,0,0,0,0,0,0,0,0,0,0
99999 END