This package contains two related BASIC programs: “IRA Planner” and “Index.” The IRA Planner offers three calculation modes — an accumulation schedule with inflation and tax impact analysis, a time-required calculator to reach a desired sum, and a deposit-change scenario — all with optional income-stream projections using a standard annuity formula at line 6140. The Index program computes how much future inflated dollars are needed to maintain purchasing-power parity with a present-day IRA accumulation, iteratively adjusting an annual deposit index factor (variable DB) via subroutine 3200 until the inflation-grown target SN and the indexed accumulation J agree within 7.5 percent. Both programs share common subroutines for data entry (2010), compound-interest accumulation (4000), and a special sub-period compounding routine (2500) that handles cases where deposits are made more frequently than compounding periods. Results are paginated in groups of 15 rows for the indexed payment schedule displayed by the Index program.
Program Analysis
Overall Structure
The listing contains two independent programs sharing a common line-number layout and many identical subroutines. IRA Planner occupies lines 5–8110 and Index occupies its own lines 5–9730. Both use a menu or prompt at the top, a shared data-entry subroutine at 2010, compound-interest engine at 4000, a sub-period compounding fallback at 2500, and income-stream projection at 6000.
IRA Planner — Program Structure
The main menu (lines 50–59) reads WHC and dispatches to one of three sections:
- Section 1 (line 100) — Standard accumulation schedule with inflation and tax analysis.
- Section 2 (line 651) — Iterates up to
400*Dperiods to find how many years are needed to reach a desired sumMONEY. - Section 3 (line 950) — Two-phase deposit-change scenario: first accumulates for
YRyears, then switches to a different deposit amount for the remainingTWEyears.
IRA Planner — Compound Interest Engine
Subroutine 3000 initializes the accumulation, setting G=B/D (periodic interest rate) and Z=D/WET (compounding periods per deposit interval). Subroutine 4000 applies one deposit cycle:
NIK = 1 + GJ = J * (NIK ** Z)— compounds existing balanceJ = J + A— adds one deposit
This assumes deposits occur after compounding within each interval. When D < WET (compounding less frequent than deposits), the program instead calls subroutine 2500, which uses a triple nested loop over years, compounding periods, and sub-periods, weighting partial deposits by their fractional position in the compounding window via PLO = FCTR * PCT.
IRA Planner — Inflation and Tax Analysis
Subroutine 5000/5610 applies inflation deflation: for C years, both J (accumulation) and VIC (total payments in today’s dollars) are divided by IN each iteration, converting future nominal values to present-value equivalents. Subroutine 4500 then prints six computed figures:
- Nominal accumulation (
RET) - Inflation-adjusted accumulation (
J) - Inflation-adjusted payments (
VIC) - Current-dollar tax savings (
NT = UNA * TAX) - Inflation-adjusted tax savings (
FDG = TAX * VIC) - Current-dollar and inflation-adjusted net gain
IRA Planner — Income Stream Projection
Subroutine 6000 computes a level periodic payment using the standard annuity formula at line 6140:
RTX = RET * (IXT / ((1 + IXT)^(CHKS*YX) - 1) + IXT)
where IXT has already been divided by CHKS * 100 to convert the annual percent rate to a per-period decimal. The program offers this calculation on both the nominal and inflation-adjusted accumulation via subroutines 7010 and 7500 respectively.
IRA Planner — Notable Anomalies
- Line 221:
LET MONEY=99000000**3— this setsMONEYto an astronomically large sentinel value (~9.7×10²³) so that theIF J>=MONEYguard in subroutine 2500 (line 2605) never triggers during normal Section 1 accumulation. This is an intentional reuse of the variable that is normally set by user input in Section 2. - Line 470:
LET B=B*100converts the decimal rate back to a percentage for display purposes at line 3520, butBis not restored — this is harmless because the display subroutine 3500 is called once andBis not used again in its decimal form in that run. - Lines 8060–8072: The logic
IF K$<>"N" THEN GOTO 6000followed byIF K$<>"N" THEN GOSUB 8000means the second statement is unreachable whenever the first branches away — theGOSUB 8000at line 8070 is dead code. - Line 952: Section 3 also uses
LET MONEY=99000000**3as a sentinel for the same guard in subroutine 2500.
Index Program — Purpose and Key Algorithm
The Index program answers: “What annual deposit index factor DB is needed so that inflation-escalating contributions produce a future sum equal to the inflation-grossed-up equivalent of the present accumulation?” The target is SN = IN^C * J (line 5680), where IN is one plus the inflation rate and C is the number of years.
Subroutine 5000 computes an initial estimate of DB based on a one-step approximation using RENFE (the nominal interest rate) and VR (the inflation rate). The iterative refinement at subroutine 3200 adjusts DB upward by 5% if the accumulation is short, or downward by 6% if it overshoots, repeating until the ratio J/SN or SN/J is within 7.5% (line 5727). The convergence check at line 5733 reports the residual indexing error as a percentage.
Index Program — Paginated Output
The indexed payment schedule is printed in pages of 15 rows via subroutines at lines 9000–9390, with hard-coded page breaks at Q=15, Q=30, Q=45, and Q=60. This accommodates up to 61+ years of data across five pages. Arrays S(C), L(C), and P(C) store the calendar year, annual payment, and per-period payment for each year, dimensioned dynamically using the runtime value of C (line 5631–5633).
Shared Subroutine Inventory
| Lines | Subroutine | Description |
|---|---|---|
| 2010–2230 | Data entry | Prompts for lump sum, annual amount, deposit frequency, interest rate, compounding frequency |
| 2500–2630 | Sub-period compounding | Used when D < WET; triple loop approximation |
| 3000–3060 | Init accumulation | Sets G, J, Z; switches to FAST mode |
| 3500–3560 | Print summary header | Displays payments, interest, years |
| 4000–4040 | One-period accumulation | Core compound interest step |
| 5000 (IRA) / 5000 (Index) | Inflation / DB estimate | Different implementations in each program |
| 5610–5880 | Inflation adjustment | Deflates J and VIC; prompts for inflation rate |
| 6000–6170 | Income stream | Annuity payment calculation |
| 7010, 7500 | Income option prompts | Optional income projection on nominal or adjusted sum |
| 8000 | More inflation data / header | Different roles in each program |
Key BASIC Idioms
INT(X*100+.5)/100— rounding to two decimal places, used consistently for all dollar output.FAST/SLOW— switching display modes around computation-heavy loops to maximize throughput, then restoring readable output.- Sentinel value
99000000**3to neutralize a guard condition without restructuring the subroutine. - Dynamic
DIMof arrays using the runtime variableCin the Index program (lines 5631–5633), allowing the array size to match the user-specified number of years. LET K$="TGV"(line 2026) initializes a flag string to a neutral value so that the conditional at line 6165 (IF K$="N" OR K$="Y") does not trigger on the first pass through the income subroutine.
Content
Image Gallery
Source Code
5 REM "IRA"
6 PRINT
7 PRINT "IRA PROGRAM"
9 PRINT
10 PRINT
11 PRINT "COPYRIGHT 1982, VINCENT H. CHASE"
12 PRINT "SOUTHERN PINES, NC 28387"
13 PRINT
14 PRINT
15 PRINT "YOU CAN CHOOSE THREE DIFFERENT MODES."
16 PRINT
17 PRINT "1 SCHEDULES, INFLATION , AND TAX IMPACTS."
19 PRINT "2 TIME REQUIRED TO GET A DESIRED SUM."
21 PRINT "3 DEPOSIT CHANGES."
30 PRINT
35 PRINT "ALL SECTIONS HAVE INCOME STREAM OPTIONS."
40 PRINT
50 PRINT "DO YOU WANT SECTION 1, 2, OR 3?"
51 PRINT "INDICATE WHICH?"
52 INPUT WHC
53 IF WHC=1 THEN GOTO 100
54 CLS
55 IF WHC=2 THEN GOTO 651
56 CLS
57 IF WHC=3 THEN GOTO 950
58 CLS
59 IF WHC>3 THEN GOTO 16
100 CLS
101 CLEAR
102 GOSUB 2010
103 LET WHC=1
140 PRINT "YEARS"
141 INPUT C
142 PRINT C;" YEARS"
143 PRINT
159 PRINT "ENTRIES CORRECT? Y OR N?"
161 INPUT A$
162 CLS
164 IF A$<>"Y" THEN GOTO 100
210 LET E=C*WET
220 GOSUB 3000
221 LET MONEY=99000000**3
225 IF D<WET THEN GOSUB 2500
226 IF D<WET THEN GOTO 340
260 FOR M=1 TO E
290 GOSUB 4000
330 NEXT M
340 SLOW
401 CLS
470 LET B=B*100
475 GOSUB 3500
485 SLOW
500 PRINT "ACCUMULATION IS $";INT (J*100+.5)/100
561 GOSUB 5610
598 GOSUB 4500
600 PRINT "DO YOU WISH AN OTHER GO? Y OR N?"
605 INPUT B$
606 CLS
607 IF B$="Y" THEN GOTO 100
608 IF B$<>"Y" THEN GOTO 16
650 CLS
651 PRINT "THIS ROUTINE TELLS YOU"
652 PRINT "HOW MANY YEARS YOU NEED"
653 PRINT "TO GET A DESIRED AMOUNT"
654 PRINT "YOU MAY WISH TO HAVE,SAY"
655 PRINT "HALF A MILLION OR SO."
656 CLEAR
657 GOSUB 3900
658 LET WHC=2
663 CLS
665 PRINT
666 PRINT "AMOUNT DESIRED $";MONEY
670 PRINT
675 GOSUB 2010
685 PRINT "DATA OK? Y OR N?"
690 INPUT C$
696 IF C$<>"Y" THEN CLS
697 IF C$<>"Y" THEN GOSUB 2010
698 IF C$<>"Y" THEN GOTO 685
700 LET E=400*D
702 LET C=400
705 CLS
710 GOSUB 3000
715 IF D<WET THEN GOSUB 2500
720 FOR M=0 TO E
750 GOSUB 4000
760 IF J>=MONEY THEN GOTO 800
770 NEXT M
800 PRINT
805 SLOW
810 PRINT
815 LET M=M/WET
816 IF D<WET THEN LET M=Y
820 PRINT "IT TAKES ";INT (M*1+.5)/1;" YEARS TO GET"
830 PRINT "THE $";MONEY;" YOU WANT."
840 PRINT
850 PRINT
852 LET VIC=0
853 LET C=INT (M*1+.5)/1
855 LET RET=MONEY
856 GOSUB 7010
857 LET HLD=MONEY
858 GOSUB 8000
860 PRINT
870 PRINT "DO YOU WISH AN OTHER GO? Y OR N?"
880 INPUT E$
890 IF E$="Y" THEN GOTO 656
891 IF E$<>"Y" THEN CLS
892 IF E$<>"Y" THEN GOTO 16
950 CLS
951 CLEAR
952 LET MONEY=99000000**3
953 LET WHC=3
955 GOSUB 2010
960 PRINT "TOTAL YEARS?"
963 INPUT C
966 PRINT C;" YEARS"
970 PRINT
973 PRINT "DATA OK? Y OR N?"
977 INPUT P$
980 IF P$<>"Y" THEN GOTO 950
985 CLS
986 PRINT
987 PRINT
990 PRINT "AFTER HOW MANY YEARS DO YOU","WANT A CHANGE?"
993 INPUT YR
996 PRINT YR;" YEARS"
1000 PRINT
1001 PRINT
1005 PRINT "HOW MUCH DO YOU WANT NOW?"
1010 INPUT HMC
1012 PRINT "$";HMC
1015 PRINT
1016 PRINT
1017 PRINT "DATA OK? Y OR N?"
1018 INPUT V$
1020 IF V$<>"Y" THEN GOTO 985
1025 CLS
1028 FAST
1030 LET TWE=C-YR
1033 LET E=YR*WET
1036 GOSUB 3000
1037 IF D<WET THEN LET C=YR
1040 IF D<WET THEN GOSUB 2500
1041 IF D<WET THEN GOTO 1060
1043 FOR M=1 TO E
1053 GOSUB 4000
1056 NEXT M
1060 LET E=TWE*WET
1063 LET A=HMC/WET
1064 LET M=0
1066 FAST
1069 IF D<WET THEN LET C=TWE
1070 IF D<WET THEN GOSUB 2500
1071 IF D<WET THEN GOTO 1090
1073 FOR M=1 TO E
1083 GOSUB 4000
1086 NEXT M
1090 CLS
1093 SLOW
1096 PRINT
1100 PRINT "ACCUMULATION IS $";INT (J*100+.5)/100
1110 PRINT
1120 GOSUB 5610
1140 GOSUB 4500
1150 PRINT
1155 PRINT "DO YOU WISH AN OTHER GO? Y OR N?"
1156 INPUT L$
1158 CLS
1160 IF L$="Y" THEN GOTO 950
1165 IF L$<>"Y" THEN GOTO 16
1900 STOP
2010 PRINT "ANY LUMP SUM UP FRONT? USE 0 IF NONE."
2020 INPUT FRT
2025 LET CHKS=0
2026 LET K$="TGV"
2030 PRINT "$";FRT
2040 PRINT
2041 LET UTAH=0
2042 LET HMC=0
2043 LET YR=0
2050 PRINT "ANTICIPATED ANNUAL AMOUNT?"
2060 INPUT ART
2070 PRINT "$";ART
2080 PRINT
2090 PRINT "TIMES TO BE DEPOSITED EACH YEAR?"
2100 INPUT WET
2110 PRINT WET;" TIMES"
2115 IF WET=0 THEN LET WET=1
2120 PRINT
2130 LET A=ART/WET
2140 PRINT "ANTICIPATED INTEREST?"
2150 INPUT P
2160 PRINT P;" PERCENT"
2170 PRINT
2180 LET B=P*.01
2190 PRINT "TIMES TO BE COMPOUNDED DURING EACH YEAR?"
2200 INPUT D
2205 IF D=0 THEN CLS
2206 IF D=0 THEN GOTO 2010
2210 PRINT D;" TIMES"
2220 PRINT
2230 RETURN
2500 PRINT
2503 LET Y=0
2504 LET U=0
2505 LET I=0
2510 LET T=WET/D
2512 LET PCT=1/T
2520 FOR Y=1 TO C
2530 FOR U=1 TO D
2535 LET FCTR=T
2537 LET ZIG=J
2540 FOR I=1 TO T
2541 LET FCTR=FCTR-1
2550 LET PLO=FCTR*PCT
2552 LET ZOOP=A*PLO
2553 LET ZIG=ZIG+ZOOP
2560 NEXT I
2570 LET J=J+(T*A)
2580 LET K=ZIG*G
2590 LET J=J+K
2600 NEXT U
2605 IF J>=MONEY THEN GOTO 800
2610 NEXT Y
2630 RETURN
3000 LET G=B/D
3010 LET J=0
3020 LET Z=D/WET
3030 FAST
3040 LET M=0
3050 LET J=J+FRT
3060 RETURN
3500 PRINT "PAYMENTS MADE","$";INT (A*100+.5)/100
3510 PRINT
3520 PRINT "INTEREST IS",B;" PERCENT"
3530 PRINT
3540 PRINT "YEARS GOING",C;" YEARS"
3550 PRINT
3560 RETURN
3900 PRINT
3930 PRINT
3935 PRINT "HOW MUCH DO YOU WANT?"
3940 INPUT MONEY
3945 PRINT "$";MONEY
3946 LET MONEY=INT (MONEY*1)/1
3950 PRINT
3990 RETURN
4000 LET NIK=1+G
4010 LET J=J*(NIK)**Z
4030 LET J=J+A
4040 RETURN
4500 CLS
4510 PRINT "ACCUMULATION IS $";INT (RET*100+.5)/100
4520 PRINT
4530 PRINT "INFLATION ADJUSTED ACCUMULATION","$";INT (J*100+.5)/100
4540 PRINT
4550 PRINT "INFLATION ADJUSTED PAYMENTS","$";INT (VIC*100+.5)/100
4560 PRINT
4565 LET UNA=UNA+FRT
4570 LET NT=UNA*TAX
4580 LET FDG=TAX*VIC
4590 PRINT "CURRENT DOLLAR TAX SAVINGS","$";INT (NT*100+.5)/100
4600 PRINT
4610 PRINT "INFLATION ADJUSTED TAX SAVING","$";INT (FDG*100+.5)/100
4620 PRINT
4623 LET GAI=RET+NT-UNA
4626 LET SAL=J+FDG-VIC
4630 PRINT "CURRENT DOLLAR GAIN $";INT (GAI*100+.5)/100
4635 PRINT
4640 PRINT "INFLATION ADJUSTED GAIN","$";INT (SAL*100+.5)/100
4650 PRINT
4660 GOSUB 7010
4665 GOSUB 7500
4668 GOSUB 8000
4670 RETURN
5000 LET IN=INFL*.01
5010 LET IN=IN+1
5030 PRINT "WHAT IS YOUR TAX BRACKET?"
5040 INPUT TX
5041 PRINT TX;" PERCENT"
5042 PRINT
5044 PRINT TAB 8;"PLEASE WAIT"
5045 PRINT
5050 LET TAX=TX*.01
5052 LET BUL=ART*C
5053 LET UTAH=HMC-ART
5054 LET UTAH=UTAH*(C-YR)
5055 IF WHC<>3 AND YR=0 THEN LET UTAH=0
5056 LET BUL=BUL+UTAH
5060 LET VIC=BUL
5070 LET UNA=VIC
5100 LET Q=0
5110 FOR Q=1 TO C
5120 LET J=J/IN
5122 LET VIC=VIC/IN
5130 NEXT Q
5140 RETURN
5610 LET RET=J
5620 LET HLD=J
5630 PRINT
5640 PRINT "WHAT IS EXPECTED INFLATION RATE?"
5650 INPUT INFL
5660 PRINT INFL;" PERCENT"
5670 PRINT
5700 GOSUB 5000
5750 SLOW
5760 PRINT "INFLATION ADJUSTED ACCUMULATION","$";INT (J*100+.5)/100
5770 PRINT
5775 LET VIC=VIC+FRT
5780 PRINT "INFLATION ADJUSTED PAYMENTS","$";INT (VIC*100+.5)/100
5830 PRINT TAB 10;"READY, GO."
5860 INPUT M$
5880 RETURN
6000 CLS
6010 PRINT "NOW YOU HAVE YOUR $";INT (RET*1+.5)/1
6012 PRINT
6015 PRINT "YOU WANT INCOME HOW LONG?"
6020 INPUT YX
6030 PRINT YX;" YEARS"
6040 PRINT
6050 PRINT "HOW MANY CHECKS A YEAR?"
6060 INPUT CHKS
6070 PRINT CHKS;" CHECKS"
6080 PRINT
6090 PRINT "ANTICIPATED INTEREST?"
6100 INPUT IXT
6110 PRINT IXT;" INTEREST"
6120 PRINT
6125 IF CHKS=0 THEN GOTO 6000
6130 LET IXT=IXT/CHKS/100
6140 LET RTX=RET*(IXT/((1+IXT)**(CHKS*YX)-1)+IXT)
6150 PRINT "YOUR CHECKS WILL BE $";INT (RTX*100+.5)/100
6155 PRINT "AND YOUR ANNUAL INCOME WILL BE","$";INT (RTX*CHKS*100+.5)/100
6160 PRINT
6165 IF K$="N" OR K$="Y" THEN GOSUB 8000
6170 RETURN
7010 PRINT "DO YOU WISH TO FIGURE YOUR","INCOME POSSIBILITIES? Y OR N."
7020 INPUT Z$
7030 IF Z$<>"Y" THEN CLS
7035 IF Z$<>"Y" THEN RETURN
7040 GOSUB 6000
7050 RETURN
7500 PRINT "DO YOU WANT AN INFLATION AD-","JUSTED RUN? Y OR N?"
7510 INPUT X$
7515 IF X$<>"Y" THEN CLS
7520 IF X$<>"Y" THEN RETURN
7525 LET RET=J
7530 GOSUB 6000
7535 RETURN
8000 PRINT "WANT MORE DATA WITH INFLATION?","Y OR N?"
8010 INPUT H$
8020 CLS
8022 IF H$<>"Y" THEN RETURN
8024 PRINT "WHAT IS THE NEW INFLATION LEVEL?"
8026 INPUT NEINF
8028 PRINT NEINF;" PERCENT"
8030 PRINT
8031 PRINT TAB 8;"PLEASE WAIT"
8032 PRINT
8034 PRINT
8035 LET NEINF=NEINF*0.01
8036 LET IN=NEINF+1
8037 LET J=HLD
8038 GOSUB 5100
8039 PRINT
8040 LET RET=J
8041 PRINT "DO YOU WISH TO CHANGE YOUR IN-"
8042 PRINT "COME STREAM YEARS, CHECKS PER"
8043 PRINT "YEAR, OR ANTICIPATED INTEREST?"
8044 PRINT "Y OR N?"
8050 INPUT K$
8060 IF K$<>"N" THEN GOTO 6000
8070 IF K$<>"N" THEN GOSUB 8000
8072 IF CHKS=0 THEN GOTO 6000
8075 PRINT
8080 PRINT "YOUR INFLATION ACCUMULATION IS","$";INT (J*100+.5)/100
8090 PRINT
8100 GOSUB 6140
8110 RETURN
5 REM "INDEX"
6 PRINT
7 PRINT "INDEX PROGRAM"
9 CLEAR
10 PRINT
11 PRINT
12 PRINT "COPYRIGHT 1982, VINCENT H. CHASE"
13 PRINT "SOUTHERN PINES, NC 28387"
14 PRINT
16 PRINT
30 PRINT "THIS PROGRAM ENABLES YOU TO COM-"
31 PRINT "PUTE AMOUNTS OF FUTURE INFLATED"
32 PRINT "DOLLARS NEEDED TO MAINTAIN PARI-"
33 PRINT "TY WITH AN IRA OR OTHER INDIVI-"
34 PRINT "DUAL RETIREMENT PLAN COMPUTED IN"
35 PRINT "TODAY DOLLARS."
40 PRINT
50 PRINT
60 PRINT "ARE YOU READY? Y OR N?"
62 INPUT Z$
63 CLS
64 IF Z$<>"Y" THEN GOTO 14
101 CLEAR
102 GOSUB 2010
140 PRINT "YEARS"
141 INPUT C
142 PRINT C;" YEARS"
143 PRINT
159 PRINT "ENTRIES CORRECT? Y OR N?"
161 INPUT A$
162 CLS
164 IF A$<>"Y" THEN GOTO 101
170 LET BIP=B
210 LET E=C*WET
220 GOSUB 3000
225 IF D<WET THEN GOSUB 2500
226 IF D<WET THEN GOTO 340
260 FOR M=1 TO E
290 GOSUB 4000
330 NEXT M
340 SLOW
401 CLS
470 LET B=B*100
475 GOSUB 3500
480 LET HLD=J
485 LET FFS=ART
500 PRINT "ACCUMULATION IS $";INT (J*100+.5)/100
515 GOSUB 5610
562 GOSUB 9500
563 GOTO 9000
564 CLS
565 GOSUB 7010
575 GOSUB 7500
600 PRINT "DO YOU WISH AN OTHER GO? Y OR N?"
605 INPUT B$
606 CLS
607 IF B$="Y" THEN GOTO 101
608 IF B$<>"Y" THEN GOTO 1900
1900 STOP
2010 PRINT "ANY LUMP SUM UP FRONT? USE 0 IF NONE."
2020 INPUT FRT
2025 LET CHKS=0
2026 LET K$="TGV"
2030 PRINT "$";FRT
2040 PRINT
2050 PRINT "ANTICIPATED ANNUAL AMOUNT?"
2060 INPUT ART
2062 IF ART=0 THEN CLS
2063 IF ART=0 THEN GOTO 2010
2070 PRINT "$";ART
2080 PRINT
2090 PRINT "TIMES TO BE DEPOSITED EACH YEAR?"
2100 INPUT WET
2110 PRINT WET;" TIMES"
2115 IF WET=0 THEN LET WET=1
2120 PRINT
2130 LET A=ART/WET
2140 PRINT "ANTICIPATED INTEREST?"
2150 INPUT POOH
2160 PRINT POOH;" PERCENT"
2170 PRINT
2180 LET B=POOH*.01
2182 LET RENFE=B
2190 PRINT "TIMES TO BE COMPOUNDED DURING EACH YEAR?"
2200 INPUT D
2205 IF D=0 THEN CLS
2206 IF D=0 THEN GOTO 2010
2210 PRINT D;" TIMES"
2220 PRINT
2230 RETURN
2500 PRINT
2503 LET Y=0
2504 LET U=0
2505 LET I=0
2510 LET T=WET/D
2512 LET PCT=1/T
2520 FOR Y=1 TO C
2530 FOR U=1 TO D
2535 LET FCTR=T
2537 LET ZIG=J
2540 FOR I=1 TO T
2541 LET FCTR=FCTR-1
2550 LET PLO=FCTR*PCT
2552 LET ZOOP=A*PLO
2553 LET ZIG=ZIG+ZOOP
2560 NEXT I
2570 LET J=J+(T*A)
2580 LET K=ZIG*G
2590 LET J=J+K
2600 NEXT U
2610 NEXT Y
2630 RETURN
3000 LET G=B/D
3010 LET J=0
3020 LET Z=D/WET
3030 FAST
3040 LET M=0
3050 LET J=J+FRT
3060 RETURN
3200 LET KOR=DB-1
3205 LET ART=FFS
3210 IF J>SN THEN LET KOR=KOR*.94
3215 LET S=SLED
3220 IF J>SN THEN GOTO 3240
3230 IF SN>J THEN LET KOR=KOR*1.05
3240 LET DB=1+KOR
3250 GOTO 5688
3500 PRINT "PAYMENTS MADE","$";INT (A*100+.5)/100
3510 PRINT
3520 PRINT "INTEREST IS",B;" PERCENT"
3530 PRINT
3540 PRINT "YEARS GOING",C;" YEARS"
3550 PRINT
3560 RETURN
4000 LET NIK=1+G
4010 LET J=J*(NIK)**Z
4030 LET J=J+A
4040 RETURN
5000 GOTO 5009
5009 LET SJ=ART*(1+RENFE)
5010 LET SAS=SJ+ART
5020 LET PAA=SAS*(1+VR)
5030 LET AOA=PAA-SJ
5040 LET DB=AOA/ART
5050 RETURN
5610 LET RENFE=BIP
5621 LET S=0
5622 LET L=0
5623 LET P=0
5625 PRINT
5626 PRINT
5627 PRINT
5628 PRINT
5630 PRINT
5631 DIM S(C)
5632 DIM L(C)
5633 DIM P(C)
5634 LET RET=HLD
5635 PRINT "WHAT IS EXPECTED INFLATION RATE?"
5640 INPUT INFL
5645 PRINT INFL;" PERCENT"
5650 PRINT
5655 PRINT "WHAT IS THE CURRENT YEAR?"
5656 INPUT S
5657 PRINT
5658 PRINT TAB 8;"PLEASE WAIT"
5659 LET SLED=S
5660 LET IN=INFL*.01
5665 LET VR=IN
5670 LET IN=IN+1
5672 LET G=RENFE
5673 LET Z=1
5680 LET SN=(IN**C)*J
5682 CLS
5683 FAST
5684 LET SUB=C
5686 GOSUB 5000
5688 LET Q=0
5689 LET J=FRT
5690 FOR Q=1 TO C
5700 LET ART=ART*DB
5705 LET A=ART
5706 LET L(Q)=INT (ART*100+.5)/100
5707 LET P(Q)=INT ((ART/WET)*100+.5)/100
5708 LET S=S+1
5709 LET S(Q)=S
5720 GOSUB 4000
5721 NEXT Q
5722 IF VR=0 THEN LET J=SN
5727 IF J/SN<.925 OR SN/J<.925 THEN GOTO 3200
5731 IF SN>=J THEN LET KLMN=SN/J
5732 IF J>SN THEN LET KLMN=J/SN
5733 LET KLMN=INT (KLMN*10000+.5)/10000
5734 IF SN>J THEN LET G$=" TOO LITTLE "
5735 IF J>SN THEN LET G$=" TOO MUCH "
5736 LET KLMN=KLMN-1
5737 LET KLMN=KLMN*100
5745 SLOW
5746 PRINT
5747 PRINT
5748 PRINT
5749 PRINT
5750 PRINT
5751 PRINT "TO MAINTAIN PARITY OF YOUR SUM"
5752 PRINT "OF $";INT (HLD*100+.5)/100;", YOU WOULD NEED"
5753 PRINT "TO ACCUMULATE $";INT (SN*100+.5)/100;" OF FU-"
5754 PRINT "TURE INFLATED DOLLARS AT A ";INFL
5755 PRINT "PERCENT INFLATION RATE OVER THE"
5756 PRINT "NEXT ";C;" YEARS."
5757 PRINT
5758 PRINT
5759 PRINT
5760 PRINT
5762 PRINT "THE INDEXING ERROR IS ON THE OR-"
5763 PRINT "DER OF ";INT (KLMN*10000+.5)/10000;" PERCENT";G$
5765 PRINT "OVER THE ";C;" YEARS, OR ";INT ((KLMN/C)*1000+.5)/1000
5766 PRINT "PERCENT OF ERROR EACH YEAR."
5770 PRINT
5771 PRINT "NEXT PAGE?"
5772 INPUT W$
5879 GOTO 562
5880 RETURN
6000 CLS
6010 PRINT "NOW YOU HAVE YOUR $";INT (RET*1+.5)/1
6012 PRINT
6015 PRINT "YOU WANT INCOME HOW LONG?"
6020 INPUT YX
6030 PRINT YX;" YEARS"
6040 PRINT
6050 PRINT "HOW MANY CHECKS A YEAR?"
6060 INPUT CHKS
6070 PRINT CHKS;" CHECKS"
6080 PRINT
6090 PRINT "ANTICIPATED INTEREST?"
6100 INPUT IXT
6110 PRINT IXT;" PERCENT"
6120 PRINT
6125 IF CHKS=0 THEN GOTO 6000
6130 LET IXT=IXT/CHKS/100
6140 LET RTX=RET*(IXT/((1+IXT)**(CHKS*YX)-1)+IXT)
6150 PRINT "YOUR CHECKS WILL BE $";INT (RTX*100+.5)/100
6155 PRINT "AND YOUR ANNUAL INCOME WILL BE","$";INT (RTX*CHKS*100+.5)/100
6160 PRINT
6170 RETURN
7010 PRINT "DO YOU WISH TO FIGURE YOUR","INCOME POSSIBILITIES? Y OR N."
7020 INPUT Z$
7030 IF Z$<>"Y" THEN CLS
7035 IF Z$<>"Y" THEN RETURN
7040 GOSUB 6000
7050 RETURN
7500 PRINT "DO YOU WANT AN INFLATION AD-","JUSTED RUN? Y OR N?"
7510 INPUT X$
7515 IF X$<>"Y" THEN CLS
7520 IF X$<>"Y" THEN RETURN
7525 LET RET=INT (SN*100+.5)/100
7530 GOSUB 6000
7535 RETURN
8000 PRINT "YEAR";TAB 8;"ANNUAL";TAB 20;"PERIOD"
8010 PRINT "PAID";TAB 8;"PAYMENT";TAB 20;"PAYMENT"
8020 PRINT
8030 RETURN
9000 GOSUB 8000
9010 LET Q=0
9020 FOR Q=1 TO C
9030 PRINT S(Q);TAB 8;"$";L(Q);TAB 20;"$";P(Q)
9040 IF Q=15 THEN GOTO 9060
9045 NEXT Q
9046 PRINT
9047 PRINT "ARE YOU THROUGH?"
9048 INPUT W$
9049 GOTO 9700
9060 PRINT
9061 PRINT "NEXT PAGE?"
9070 INPUT H$
9080 CLS
9090 GOSUB 8000
9100 FOR Q=16 TO C
9110 PRINT S(Q);TAB 8;"$";L(Q);TAB 20;"$";P(Q)
9120 IF Q=30 THEN GOTO 9140
9125 NEXT Q
9126 PRINT
9127 PRINT "ARE YOU THROUGH?"
9128 INPUT W$
9129 GOTO 9700
9140 PRINT
9141 PRINT "NEXT PAGE?"
9150 INPUT H$
9160 CLS
9170 GOSUB 8000
9200 FOR Q=31 TO C
9210 PRINT S(Q);TAB 8;"$";L(Q);TAB 20;"$";P(Q)
9240 IF Q=45 THEN GOTO 9260
9245 NEXT Q
9246 PRINT
9247 PRINT "ARE YOU THROUGH?"
9248 INPUT W$
9249 GOTO 9700
9260 PRINT
9261 PRINT "NEXT PAGE?"
9262 INPUT H$
9263 CLS
9270 GOSUB 8000
9275 FOR Q=46 TO C
9280 PRINT S(Q);TAB 8;"$";L(Q);TAB 20;"$";P(Q)
9290 IF Q=60 THEN GOTO 9296
9291 NEXT Q
9292 PRINT
9293 PRINT "ARE YOU THROUGH?"
9294 INPUT W$
9295 GOTO 9700
9297 PRINT
9300 PRINT "NEXT PAGE?"
9301 INPUT H$
9302 CLS
9310 GOSUB 8000
9315 FOR Q=61 TO C
9320 PRINT S(Q);TAB 8;"$";L(Q);TAB 20;"$";P(Q)
9325 NEXT Q
9390 PRINT
9400 PRINT "ARE YOU THROUGH? Y OR N?"
9410 INPUT W$
9411 GOTO 9700
9450 GOTO 564
9500 CLS
9505 LET SBB=DB-1
9506 LET SBB=SBB*100
9510 PRINT
9520 PRINT "PRESENTLY MAXIMUM ANNUAL CONTRI-"
9525 PRINT "BUTIONS ARE LIMITED BY THE TAX "
9530 PRINT "CODE, HOWEVER, THE TABLES ON THE"
9535 PRINT "NEXT PAGES SHOW HOW ONE MIGHT"
9540 PRINT "INDEX THEM IF THAT WERE LEGALLY"
9545 PRINT "POSSIBLE. IN THE PRESENT CASE,"
9550 PRINT "THE INDEX TO MAINTAIN PARITY FOR"
9555 PRINT "THE NEXT ";C;" YEARS WOULD BE ON"
9560 PRINT "THE ORDER OF ";INT (SBB*1000+.5)/1000;" PERCENT TO"
9561 PRINT "INCREASE THE ANNUAL CONTRIBUTION"
9562 PRINT "EACH YEAR BY THAT INDEX."
9563 PRINT
9564 PRINT
9565 PRINT
9566 PRINT
9567 PRINT
9570 PRINT
9575 PRINT
9580 PRINT "NEXT PAGE?"
9585 INPUT W$
9590 CLS
9595 RETURN
9700 PRINT
9705 LET J=HLD
9706 LET ART=FFS
9710 PRINT "DO YOU WANT A RUN WITH A DIFFER-"
9715 PRINT "ENT INFLATION LEVEL? Y OR N?"
9720 INPUT U$
9722 IF U$="Y" THEN CLS
9725 IF U$="Y" THEN GOTO 5610
9730 GOTO 564
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.