10 REM * FINANCIAL INFORMATION by Ronleigh Dale, Box 70252, Reno Nevada 89570,
20 REM *  702/825-6060, v1.3, 8/5/86
30 PRINT CHR$(27)+CHR$(46)+CHR$(48)
40 L1=13
50 DEF FNR(X)=INT(X*100+.5)/100
60 CL$=CHR$(26):REM * CLEAR SCREEN
70 PRINT CL$:FOR Z=1 TO 1000:NEXT Z
80 PRINT"FINANCIAL INFORMATION
90 PRINT:PRINT
100 PRINT:PRINT"MENU
110 PRINT
120 PRINT " 1. FUTURE VALUE OF AN INVESTMENT"
130 PRINT " 2. FUTURE VALUE OF REGULAR DEPOSITS"
140 PRINT " 3. REGULAR DEPOSITS TO AN INVESTMENT
150 PRINT " 4. REGULAR WITHDRAWALS FROM AN INVESTMENT"
160 PRINT " 5. INITIAL INVESTMENT REQUIRED FOR FUTURE VALUE
170 PRINT " 6. MINIMUM INVESTMENT FOR WITHDRAWALS"
180 PRINT " 7. NOMINAL INTEREST RATE ON INVESTMENTS"
190 PRINT " 8. EFFECTIVE INTEREST RATE ON INVESTMENTS"
200 PRINT " 9. EARNED INTEREST SCHEDULE
210 PRINT "10. LOAN AMORTIZATION SCHEDULE
220 PRINT "11. ADD-ON LOAN PAYOFF REBATE/AMOUNT
230 PRINT "12. CHECKBOOK BALANCE 
240 PRINT "13. EXIT
250 PRINT
260 INPUT X
270 PRINT CL$
280 IF X=10 THEN 2760
290 IF X=11 THEN 3570
300 IF X=12 THEN 3910
310 IF X=13 THEN 4170
320 ON X GOSUB 350,460,580,720,830,950,1070,1180,1310
330 GOTO 10
340 REM * PROGRAM #1 BEGINS HERE
350 PRINT "FUTURE VALUE OF AN INVESTMENT"
360 PRINT:INPUT "INITIAL INVESTMENT                      ";P:IF P=0 THEN 70
370 GOSUB 1290
380 GOSUB 1300
390 GOSUB 1270
400 I=I/N/100
410 T=P*(I+1)^(N*Y)
420 GOSUB 1260
430 GOSUB 2750
440 GOTO 10
450 REM * PROGRAM #2 BEGINS HERE
460 PRINT "FUTURE VALUE OF REGULAR DEPOSITS
470 PRINT 
480 INPUT "AMOUNT OF REGULAR DEPOSITS              ";R
490 IF R=0 THEN 70
500 GOSUB 1290
510 INPUT "NUMBER OF DEPOSITS PER YEAR             ";N
520 GOSUB 1270
530 I=I/N/100
540 T=R*((I+1)^(N*Y)-1)/I
550 GOSUB 1260
560 GOSUB 2750:GOTO 70
570 REM * PROGRAM #3 BEGINS HERE
580 PRINT "REGULAR DEPOSITS TO AN INVESTMENT
590 PRINT
600 INPUT "TOTAL VALUE AFTER ? YEARS               ";T
610 IF T=0 THEN 70
620 GOSUB 1290
640 INPUT "NUMBER OF DEPOSITS PER YEAR             ";N
650 GOSUB 1270
660 I=I/N/100
670 R=T*I/((I+1)^(N*Y)-1)
680 PRINT:PRINT"DEPOSIT AMOUNT = "TAB(41)"$";R
700 GOSUB 2750:GOTO 10
710 REM * PROGRAM #4 BEGINS HERE
720 PRINT "REGULAR WITHDRAWALS FROM AN INVESTMENT"
730 PRINT:INPUT"INITIAL INVESTMENT                      ";P
740 IF P=0 THEN 70
750 GOSUB 1290
760 INPUT "NUMBER OF WITHDRAWALS PER YEAR          ";N
770 GOSUB 1270
780 I=I/N/100
790 R=P*(I/((I+1)^(N*Y)-1)+I)
800 PRINT:PRINT "AMOUNT OF EACH WITHDRAWAL = "TAB(41)"$";INT(R*100+.5)/100
810 GOSUB 2750:GOTO 10
820 REM * PROGRAM #5 BEGINS HERE
830 PRINT "INITIAL INVESTMENT"
840 PRINT
850 INPUT "TOTAL VALUE AFTER ? YEARS               ";T
860 IF T=0 THEN 70
870 GOSUB 1300
880 GOSUB 1270
890 GOSUB 1290
900 I=I/N/100
910 P=T/(I+1)^(N*Y)
920 PRINT:PRINT "INITIAL INVESTMENT = "TAB(41)"$";INT(P*100+.5)/100
930 GOSUB 2750:GOTO 70
940 REM * PROGRAM #6 BEGINS HERE
950 PRINT "MINIMUM INVESTMENT FOR WITHDRAWALS"
960 PRINT
970 INPUT "AMOUNT OF WITHDRAWALS                   ";R
980 IF R=0 THEN 70
990 GOSUB 1290
1000 INPUT "NUMBER OF WITHDRAWALS PER YEAR          ";N
1010 GOSUB 1270
1020 I=I/100
1030 P=R*N/I*(1-1/((1+I/N)^(N*Y)))
1040 PRINT:PRINT "MINIMUM INVESTMENT = "TAB(41)"$";INT(100*P+.5)/100
1050 GOSUB 2750:GOTO 10
1060 REM * PROGRAM #7 BEGINS HERE
1070 PRINT "NOMINAL INTEREST RATE ON INVESTMENTS"
1080 PRINT
1090 INPUT "PRINCIPAL AMOUNT                        ";P
1100 IF P=0 THEN 70
1110 INPUT "FINAL VALUE                             ";T
1120 GOSUB 1270
1130 GOSUB 1300
1140 I2=N*((T/P)^(1/(N*Y))-1)*100
1150 PRINT:PRINT "NOMINAL INTEREST RATE = "TAB(42);I2;"%"
1160 GOSUB 2750:GOTO 10
1170 REM * PROGRAM #8 BEGINS HERE
1180 PRINT "EFFECTIVE INTEREST RATE ON INVESTMENTS"
1190 PRINT
1200 INPUT "INITIAL INVESTMENT                      ";P
1210 IF P=0 THEN 70
1220 INPUT "TOTAL VALUE AFTER ? YEARS               ";T
1230 GOSUB 1270
1240 PRINT:PRINT "ANNUAL INTEREST RATE = "TAB(42);((T/P)^(1/Y)-1)*100;"%"
1250 GOSUB 2750:GOTO 10
1260 PRINT:PRINT "FUTURE VALUE = "TAB(41)"$";INT(T*100+.5)/100:RETURN
1270 INPUT "NUMBER OF YEARS/MONTHS                  ";Y0,M
1280 Y=(12*Y0+M)/12:RETURN
1290 INPUT "NOMINAL INTEREST RATE                   ";I:RETURN
1300 INPUT "NUMBER OF COMPOUNDING PERIODS PER YEAR  ";N:RETURN
1310 REM * PROGRAM #9 BEGINS HERE
1320 PRINT "EARNED INTEREST SCHEDULE
1330 PRINT:INPUT"PRINTED REPORT (Y/N)";Z$:IF Z$="Y" THEN  2060
1340 PRINT:INPUT "PRINCIPAL AMOUNT                        ";P
1350 GOSUB 1290
1360 I=I/100
1370 INPUT "NUMBER OF DEPOSITS/WITHDRAWALS PER YEAR ";N1
1380 IF N1=0 THEN 1430
1390 INPUT "AMOUNT OF DEPOSIT/WITHDRAWAL            ";R
1400 N=360
1410 L2=N1
1420 GOTO 1460
1430 GOSUB 1300
1440 N1=0
1450 L2=4
1460 INPUT "START WITH WHAT YEAR                    ";X
1470 INPUT "END WITH WHAT YEAR                      ";Y
1472 PRINT:INPUT"ENTRY CORRECT (Y/N)";Z$:IF Z$="N" THEN PRINT CHR$(26):GOTO 1340
1480 X=INT(X)
1490 B0=P:I1=0:I2=0:I3=0:K=66:P1=4
1500 FOR J0=1 TO INT(Y)+1
1510 IF J0<X THEN 1690
1520 IF K<55 THEN 1680
1530 REM SPACE TO NEXT PAGE, PRINT HEADINGS (ASSUMING 66 LINES/PAGE)
1540 FOR K1=K TO 66
1550 PRINT
1560 NEXT K1
1570 K=6
1580 PRINT "EARNED INTEREST TABLE"
1590 PRINT "PRINCIPAL $";P;"AT ";I*100;"% NOMINAL FOR ";Y;"YEARS"
1600 IF N1=0 THEN 1630
1610 PRINT "REGULAR DEPOSIT/WITHDRAWAL $";R;"";N1;"TIMES PER YEAR"
1620 K=K+1
1630 PRINT "EFFECTIVE INTEREST RATE";FNR(100*((1+I/N)^N-1));"% PER YEAR"
1640 PRINT
1650 PRINT "YEAR","   BALANCE","INTEREST","ACCUMULATED
1660 PRINT,,," INTEREST"
1670 PRINT
1680 PRINT J0,
1690 L1=1
1700 N2=1
1710 P2=1
1720 FOR J1=1 TO N
1730 IF N2>N1 THEN 1770
1740 IF N2/N1>J1/N THEN 1770
1750 B0=B0+R
1760 N2=N2+1
1770 B2=B0*(1+I/N)
1780 I1=B2-B0
1790 I3=I3+I1
1800 I2=I2+I1
1810 IF P2/P1>J1/N THEN 1850
1820 I2=FNR(I2)
1830 B2=FNR(B2)
1840 P2=P2+1
1850 IF J0<X THEN 1930
1860 IF J1/N<L1/L2 THEN 1930
1870 L1=L1+1
1880 PRINT TAB(17);
1890 PRINT FNR(B2),FNR(I3),FNR(I2)
1900 I3=0
1910 K=K+1
1920 REM
1930 B0=B2
1940 IF J0+J1/N-1>=Y THEN 2000
1950 NEXT J1
1960 IF J0<X THEN 1990
1970 PRINT
1980 K=K+1
1990 NEXT J0
2000 PRINT
2010 PRINT "CHANGE DATA/RECOMPUTE";
2020 INPUT A$:IF LEFT$(A$,1)="Y" THEN PRINT CHR$(26):GOTO 1320
2030 PRINT:INPUT"PREPARE PRINTED REPORT";Z$:IF Z$="Y" THEN 2060
2040 GOTO 70
2050 LINE INPUT Z$:RETURN
2060 PRINT 
2070 INPUT "PRINCIPAL AMOUNT                        ";P
2080 GOSUB 1290
2090 I=I/100
2100 INPUT "NUMBER OF DEPOSITS/WITHDRAWALS PER YEAR ";N1
2110 IF N1=0 THEN 2160
2120 INPUT "AMOUNT OF DEPOSIT/WITHDRAWAL            ";R
2130 N=360
2140 L2=N1
2150 GOTO 2190
2160 GOSUB 1300
2170 N1=0
2180 L2=4
2190 INPUT "START WITH WHAT YEAR                    ";X
2200 INPUT "END WITH WHAT YEAR                      ";Y
2205 PRINT:INPUT"ENTRY CORRECT (Y/N)";Z$:IF Z$="N" THEN PRINT CHR$(26):GOTO 2060
2210 X=INT(X)
2220 B0=P:I1=0:I2=0:I3=0:K=66:P1=4
2230 FOR J0=1 TO INT(Y)+1
2240 IF J0<X THEN 2420
2250 IF K<55 THEN 2410
2260 REM SPACE TO NEXT PAGE, PRINT HEADINGS (ASSUMING 66 LINES/PAGE)
2270 FOR K1=K TO 66
2280 LPRINT
2290 NEXT K1
2300 K=8
2310 LPRINT "EARNED INTEREST TABLE"
2320 LPRINT "PRINCIPAL $";P;"AT ";I*100;"% NOMINAL FOR ";Y;"YEARS"
2330 IF N1=0 THEN 2360
2340 LPRINT "REGULAR DEPOSIT/WITHDRAWAL $";R;"";N1;"TIMES PER YEAR"
2350 K=K+1
2360 LPRINT "EFFECTIVE INTEREST RATE";FNR(100*((1+I/N)^N-1));"% PER YEAR"
2370 LPRINT
2380 LPRINT "YEAR","   BALANCE","INTEREST","ACCUMULATED"
2390 LPRINT,,," INTEREST"
2400 LPRINT
2410 LPRINT J0,
2420 L1=1
2430 N2=1
2440 P2=1
2450 FOR J1=1 TO N
2460 IF N2>N1 THEN 2500
2470 IF N2/N1>J1/N THEN 2500
2480 B0=B0+R
2490 N2=N2+1
2500 B2=B0*(1+I/N)
2510 I1=B2-B0
2520 I3=I3+I1
2530 I2=I2+I1
2540 IF P2/P1>J1/N THEN 2580
2550 I2=FNR(I2)
2560 B2=FNR(B2)
2570 P2=P2+1
2580 IF J0<X THEN 2660
2590 IF J1/N<L1/L2 THEN 2660
2600 L1=L1+1
2610 LPRINT TAB(17);
2620 LPRINT FNR(B2),FNR(I3),FNR(I2)
2630 I3=0
2640 K=K+1
2650 REM
2660 B0=B2
2670 IF J0+J1/N-1>=Y THEN 2730
2680 NEXT J1
2690 IF J0<X THEN 2720
2700 LPRINT
2710 K=K+1
2720 NEXT J0
2730 LPRINT
2740 GOTO 10
2750 LINE INPUT Z$:RETURN
2760 PRINT CHR$(26)
2770 REM * PROGRAM #10 BEGINS HERE
2780 PRINT"LOAN AMORTIZATION SCHEDULE"
2790 PRINT
2800 REM *********** LOAN AMORTIZATION PROGRAM
2810 REM *********** INPUT SECTION
2820 INPUT"LOAN AMOUNT           ";L      
2830 INPUT"ANNUAL INTEREST RATE  ";R
2840 INPUT"TERM IN MONTHS        ";Y
2850 LET I=(R/12)/100
2860 LET M=Y
2870 REM *********** COMPUTE THE MONTHLY PAYMENT AND PRINT
2880 LET A=(I*L)/((1-(I+1)^-M))
2890 PRINT:PRINT"THE MONTHLY PAYMENT IS:";A
2900 PRINT
2910 REM *********** INITIALIZE FOR AMORTIZATION SCHEDULE
2920 LET B=L
2930 LET T=0
2940 REM *********** LOOP FOR THE NUMBER OF PAYMENT
2950 FOR J=1 TO M
2960 REM *********** COMPUTE THE INTEREST
2970 LET I1=B*I
2980 REM *********** COMPUTE  PRINCIPAL
2990 LET P=A-I1
3000 REM *********** FORCE OUT  LAST PAYMENT
3010 IF J=M THEN LET P=B
3020 REM *********** UPDATE LOAN BALANCE
3030 LET B=B-P
3040 REM *********** PRINT MONTHLY PAYMENT DETAIL
3050 LET T=T+I1
3060 X$="  ###          ###.##         ###.##       ######.##       ######.##"
3070 PRINT USING X$; J,I1, P, B, T
3080 NEXT J
3090 PRINT:PRINT" NUMBER"," INTEREST"," PRINCIPAL","   BALANCE","    INTEREST"
3100 PRINT,,,"     DUE","      TOTAL"
3110 PRINT:PRINT"THE MONTHLY PAYMENT IS:";A
3120 E=L+T
3130 PRINT"THE PAYMENT TOTAL   IS:"E
3140 PRINT:PRINT"LOAN AMOUNT:     ";L
3150 PRINT"INTEREST RATE:   ";R"%"
3160 PRINT"TERM IN MONTHS:  ";Y
3170 PRINT:INPUT"PROCESS ANOTHER TABLE  (Y/N)";Z$:IF Z$="Y" THEN 2760
3180 PRINT:INPUT"PREPARE PRINTED REPORT (Y/N)";Z$:IF Z$="Y" THEN 3190 ELSE 10
3190 REM *********** LOAN AMORTIZATION PROGRAM
3200 REM *********** INPUT SECTION
3210 PRINT CHR$(26)
3220 REM *********** CHANGE ANNUAL RATE TO MONTHLY RATE
3230 LET I=(R/12)/100
3240 LET M=Y
3250 REM *********** COMPUTE THE MONTHLY PAYMENT AND PRINT
3260 LET A=(I*L)/((1-(I+1)^-M))
3270 LPRINT:LPRINT:LPRINT
3280 LPRINT"LOAN AMORTIZATION SCHEDULE"
3290 LPRINT:LPRINT"LOAN AMOUNT:   ";L
3300 LPRINT"INTEREST RATE: ";R"%"
3310 LPRINT"TERM IN MONTHS:";Y
3320 LPRINT:LPRINT"THE MONTHLY PAYMENT IS:";A
3330 LPRINT"THE PAYMENT TOTAL   IS:";E
3340 LPRINT
3350 REM *********** INITIALIZE FOR AMORTIZATION SCHEDULE
3360 LET B=L
3370 LET T=0
3380 LPRINT"NUMBER","INTEREST","PRINCIPAL","BALANCE DUE","TOTAL INTEREST"
3390 LPRINT
3400 REM *********** LOOP FOR THE NUMBER OF PAYMENT
3410 FOR J=1 TO M
3420 REM *********** COMPUTE THE INTEREST
3430 LET I1=B*I
3440 REM *********** COMPUTE PRINCIPAL
3450 LET P=A-I1
3460 REM *********** FORCE OUT LAST PAYMENT
3470 IF J=M THEN LET P=B
3480 REM *********** UPDATE LOAN BALANCE
3490 LET B=B-P
3500 REM *********** LPRINT MONTHLY PAYMENT DETAIL
3510 LET T=T+I1
3520 X$=" ###           ###.##         ###.##       ######.##       ######.##"
3530 LPRINT USING X$; J,I1, P, B, T
3540 NEXT J
3550 GOTO 10
3560 REM * PROGRAM #11 BEGINS HERE
3570 PRINT CHR$(26)	
3580 PRINT CHR$(27)+CHR$(46)+CHR$(48)
3590 PRINT"LOAN PAYOFF SCHEDULE"
3600 PRINT:PRINT:PRINT:PRINT
3610 INPUT"ORIGINAL LOAN AMOUNT               $ ",L
3620 IF L<=0 THEN 3610
3630 INPUT"ORIGINAL FINANCE CHARGE            $ ",P
3640 IF P<=0 THEN 3630
3650 T=L+P
3660 INPUT"ORIGINAL NUMBER OF PAYMENTS          ",N
3670 IF N<=0 THEN 3660
3680 PM=T/N
3690 INPUT"PAYMENTS TO DATE                     ",K
3700 IF K>N OR K<=0 THEN 3690
3710 IF P<=0 THEN 3710
3720 I=((2*(N-K+1))/(N*(N+1)))*P
3730 RB=((N-K)*I)/2
3740 BL=((N-K)*PM)-RB
3750 II=INT(I*100+.5)/100
3760 R=INT(RB*100+.5)/100
3770 B=INT(BL*100+.5)/100
3780 PRINT
3790 PRINT"ORIGINAL PAYMENT TOTAL             $";T
3800 PRINT"ORIGINAL MONTHLY PAYMENT           $";PM
3810 A=PM*K
3820 PRINT"TOTAL PAID TO DATE                 $";A
3830 PRINT
3840 PRINT"REBATE AMOUNT                      $";R
3850 PRINT"PAYOFF AMOUNT                      $";B
3870 PRINT
3880 INPUT"PREPARE ANOTHER SCHEDULE";Z$:IF Z$="Y" THEN 3570
3890 GOTO 10
3900 REM * PROGRAM #12 BEGINS HERE
3910 PRINT CHR$(26)
3920 PRINT "CHECKBOOK BALANCE"
3930 DIM CN(100),CA(100),D(100)
3940 PRINT :PRINT
3950 INPUT"STATEMENT BALANCE $ ",BB
3960 N=N+1
3970 PRINT
3980 CN(N)=VAL (CN$)
3990 INPUT"CHECK AMOUNT                     $ ",CA(N)
4000 CT=CT+CA(N)
4010 IF CA(N)=0 THEN 4020 ELSE 3990
4020 PRINT TAB(70)"$";CT
4030 L=L+1
4040 INPUT"DEPOSIT AMOUNT                             $ ",DA$
4050 IF DA$="" THEN 4090
4060 D(L)=VAL (DA$)
4070 DT=DT+D(L)
4080 GOTO 4030
4090 PRINT TAB(70)"$";DT
4100 NB=BB-CT+DT
4110 PRINT"CURRENT BALANCE   $";NB
4120 CLEAR
4130 PRINT CHR$(27)+CHR$(46)+CHR$(50)
4150 PRINT:INPUT"BALANCE ANOTHER CHECKBOOK";Z$:IF Z$="Y" THEN 3910
4160 GOTO 10
4170 PRINT CHR$(27)+CHR$(46)+CHR$(50):END

4150 PRINT:INPUT"BALANCE ANOTHER CHECKBOOK";Z$:IF