Compucolor.org – Virtual Media

Listing of file='LOAN.BAS;01' on disk='vmedia/sampler-3.31.78-sector.ccvf'

0 CLEAR 100
5 REM
50 DIM DOL(5),CENT(5),CENT$(5)
100 PLOT 6:PLOT 1:PLOT 12
110 REM
115 PRINT :PRINT :PLOT 14
120 PRINT "DECLINING INTEREST PROGRAM"
125 PRINT "--------- -------- -------":PLOT 15:PRINT
126 Q9= PEEK (32936):IF Q9< > 0THEN A= 3000:R= 7.5:M= 12:B$= "Y":GOTO 180
130 INPUT "AMOUNT OF LOAN             ";A
140 INPUT "INTEREST RATE (E.G. 9.25)  ";R
150 INPUT "LENGTH OF LOAN (IN MONTHS) ";M
160 IF M< > INT (M)THEN 150
165 PRINT
170 INPUT "WANT PAYMENT CALCULATED FOR YOU (Y OR N)  ";B$
180 PRINT :PRINT A;" FOR ";M;" MONTHS AT ";R;" PERCENT"
190 IF B$= "Y"THEN 210
195 PRINT
200 INPUT "WHAT IS THE MONTHLY PAYMENT  ";P
210 REM
215 IF B$= "N"THEN WW= 2
220 R= R/ 1200
225 IF B$= "Y"THEN X$= B$
230 IF B$< > "Y"THEN 280
240 REM
250 C= (1+ R)^ M
260 P= A* ((R* C)/ (C- 1))
270 P= (P* 100)+ 1:P= INT (P):P= P/ 100
280 PRINT "MONTHLY PAYMENT = ";P
290 REM
295 PRINT
296 IF Q9< > 0THEN FOR Q= 0TO 3000:NEXT :GOTO 310
300 INPUT "WANT A MONTHLY BREAKDOWN (Y OR N)  ";B$
310 IF B$= "N"THEN 350
320 IF B$< > "Y"THEN 300
321 PLOT 12:PLOT 14:PLOT 3:PLOT 12:PLOT 0
322 PRINT "A M O R T I Z A T I O N   S C H E D U L E"
323 PLOT 3:PLOT 12:PLOT 2
324 PRINT "= = = = = = = = = = = =   = = = = = = = ="
325 PLOT 15:PLOT 3:PLOT 0:PLOT 5
326 PRINT A;" FOR ";M;" MONTHS AT ";R* 1200;" PERCENT":PRINT
327 PRINT "MONTHLY PAYMENT =";P
330 PRINT
331 GOSUB 1500
335 PLOT 3:PLOT 0:PLOT 10
340 PRINT "MONTH   BALANCE   INTEREST   INT T.D   PRINCIPAL   PRIN T.D"
350 Z= 0:T= Z:I2= Z:N2= Z:P2= Z
355 IF B$< > "N"THEN 360
356 PLOT 3:PLOT 0:PLOT 19+ WW
357 PLOT 6:PLOT 69:PRINT "CALCULATING"
358 PLOT 6:PLOT 2
359 PLOT 3:PLOT 64:PLOT 32
360 B= A
366 IF B$< > "Y"THEN 368
367 PLOT 3:PLOT 0:PLOT 12
368 PLOT 27:PLOT 24
369 Y= 13
370 FOR K= 1TO M
371 IF B$= "N"THEN 380
375 IF K= YTHEN GOSUB 1410
380 I= B* R
390 I= (I* 100)+ 1:I= INT (I):I= I/ 100
400 IF K= MTHEN P= B+ I
410 P2= P2+ P
420 N= P- I:B= B- N:I2= I2+ I:N2= N2+ N
430 IF B$= "N"THEN 450
431 B= INT (B* 100)* .01:I= INT (I* 100)* .01:I2= INT (I2* 100)* .01:N= INT (N* 100)* .01
432 N2= INT (N2* 100)* .01
433 GOSUB 520
436 K$= STR$ (K):IK= 5- LEN (K$)
437 K$= STR$ (DOL(1)):ID= 12- LEN (K$)
438 K$= STR$ (DOL(2)):II= 23- LEN (K$)
439 K$= STR$ (DOL(3)):I3= 33- LEN (K$)
440 K$= STR$ (DOL(4)):IN= 45- LEN (K$)
441 K$= STR$ (DOL(5)):N3= 56- LEN (K$)
445 PLOT 23:PRINT TAB( IK);K;
446 PLOT 18:PRINT TAB( ID);DOL(1);RIGHT$ (CENT$(1),W1);
447 PLOT 17:PRINT TAB( II);DOL(2);RIGHT$ (CENT$(2),W2);TAB( I3);DOL(3);RIGHT$ (CENT$(3),W3);
448 PLOT 22:PRINT TAB( IN);DOL(4);RIGHT$ (CENT$(4),W4);TAB( N3);DOL(5);RIGHT$ (CENT$(5),W5)
450 NEXT K
451 PLOT 27:PLOT 11
452 IF B$< > "N"THEN 455
453 PLOT 3:PLOT 0:PLOT 19+ WW:PLOT 11
454 PLOT 3:PLOT 0:PLOT 19+ WW
455 PLOT 15:PRINT
460 PRINT "FINAL PAYMENT = ";P
470 PRINT "TOTAL PAYMENTS = ";P2:PRINT
475 IF B$= "N"THEN GOSUB 1500
479 PLOT 3,0,31:IF Q9< > 0THEN FOR Q= 0TO 3000:NEXT :GOTO 510
480 INPUT "WANT TO DO ANOTHER ONE  ";B$
490 IF B$= "Y"THEN PLOT 12
495 IF B$= "Y"THEN GOTO 115
500 IF B$< > "N"THEN 480
505 PLOT 12
510 LOAD "MENU;1":RUN 5
520 REM
530 W1= 3:W2= 3:W3= 3:W4= 3:W5= 3
540 FOR Q= 1TO 5
550 ON QGOTO 560,570,580,590,600
560 V= B:GOTO 610
570 V= I:GOTO 610
580 V= I2:GOTO 610
590 V= N:GOTO 610
600 V= N2
610 DOL(Q)= INT (V)* 100
620 AX= INT (V* 100)
630 CENT(Q)= ABS (AX- DOL(Q))
640 DOL(Q)= INT (DOL(Q)* .01)
650 CENT(Q)= CENT(Q)* .01
660 CENT$(Q)= STR$ (CENT(Q))
670 IF MID$ (CENT$(Q),2,1)= "."AND LEN (CENT$(Q))= 3THEN 690
680 GOTO 710
690 CENT$(Q)= MID$ (CENT$(Q),2,2)+ "0"
700 GOTO 730
710 IF MID$ (CENT$(Q),2,1)= "."THEN 730
720 IF LEN (CENT$(Q))= 2THEN CENT$(Q)= ".00"
730 NEXT Q
740 RETURN
1410 Y= Y+ 12
1420 PRINT :PRINT
1425 INPUT "HIT THE RETURN KEY TO SEE THE NEXT 12 INSTALLMENTS.";ZX$
1430 FOR U= 1TO 15
1440 PLOT 3:PLOT 0:PLOT U+ 11:PLOT 11
1450 NEXT U
1460 PLOT 3:PLOT 0:PLOT 12
1470 IF B$< > "N"THEN 1490
1480 PLOT 3:PLOT 64:PLOT 32
1490 RETURN
1500 REM
1510 EFF= (1+ R)^ 12- 1
1520 EFF= INT (EFF* 10000)/ 100
1530 PRINT :PLOT 6:PLOT 5
1535 IF B$= "N"THEN 1540
1536 PLOT 3:PLOT 0:PLOT 28
1540 PRINT "THE EFFECTIVE RATE OF INTEREST = ";EFF;"%"
1550 PLOT 6:PLOT 7
1560 PRINT "   (IE THE TRUE INTEREST )"
1570 PRINT
1580 PLOT 6:PLOT 2
1590 RETURN