10 REM ************ RECURSIVE BUDGETING ***************** 20 REM 30 REM by O.E. Dial 40 REM 50 REM Ref. 'PERSONAL COMPUTING' May/June 1977 60 REM pgs. 54-59 70 REM 80 REM -------------------------------------------------- 90 REM 100 Q=27: V$="###.#" : W$="$$#####," : U$="###" 110 CL$=CHR$(27)+CHR$(69):REM Screen clear 120 DIM D(18),E$(Q),V(Q),F(Q) 130 PRINT CL$; 140 PRINT TAB(19)"RECURSIVE BUDGETING MODEL": PRINT: PRINT TAB(28)"* * *" 150 PRINT CL$; 160 DATA SALARY/WAGES,OTHER INCOME,FED INC TAX,STATE AND LOCAL TAX 170 DATA SOCIAL SECURITY,UNEMPLOYMENT INS,HEALTH INS 180 DATA LIFE INS,CONTRIBUTIONS,OTHER DEDUCTIONS 190 DATA RENT/MORTGAGE,LIFE INS, HEALTH INS, HOUSE INS 200 DATA AUTO INS,CAR PAYMENTS,LOAN PAYMENTS,TRASH REMOVAL 210 DATA OTHER FIXED EXP 220 DATA FOOD/BEVERAGES,CLOTHING,DRY CLEANING,BARBER/BEAUTY 230 DATA HOME MAINT,HOME HEAT'G FUEL,WATER,ELECTRICITY,TELEPHONE 240 DATA GAS/OIL,AUTO MAINT,FARES/TOLLS/PARKING,DENTIST 250 DATA PHYSICIAN,DRUGS/SUNDRIES,SCHOOL EXPENSE,FAMILY ALLOWANCE 260 DATA CLUBS/LODGES,THEATER/SPORTS,RESTAURANTS 270 DATA OTHER ENT'MENT,MAG'S/BOOKS/PAPERS,SITTERS,CHILD CARE 280 DATA VACATION SAVINGS,OTHER SAVINGS,CONTRIBUTIONS,OTHER EXPENSES 290 REM 300 REM 310 PRINT: PRINT"Select your budgeting period by number. Later on it will" 320 PRINT"be extended to one year.": PRINT 330 PRINT TAB(10)"1-WEEKLY" 340 PRINT TAB(10)"2-BIWEEKLY" 350 PRINT TAB(10)"3-SEMIMONTHLY" 360 PRINT TAB(10)"4-MONTHLY" 370 PRINT 380 INPUT": ",P 390 IF P>4 THEN PRINT"Try again!" ELSE 410 400 GOTO 310 410 IF P=1 THEN P=52 420 IF P=2 THEN P=26 430 IF P=3 THEN P=24 440 IF P=4 THEN P=12 450 PRINT CL$; 460 PRINT:PRINT"Alright, first let's look at income for the period." 470 PRINT 480 READ A$:PRINT A$;" $";: INPUT"",D(0):READ A$:PRINT A$;" $";:INPUT"",D(1) 490 TI=D(0)+D(1) 500 PRINT CL$; 510 PRINT:PRINT"Ok, now let's look at paycheck deductions.":PRINT 520 FOR J=2 TO 9: READ A$: PRINT A$;" $";:INPUT"",D(J):TD=TD+D(J): NEXT J 530 PRINT CL$; 540 PRINT"Ok, now let's look at fixed expenses.": PRINT 550 FOR J=10 TO 18:READ A$:PRINT A$;" $";:INPUT"",D(J):TF=TF+D(J): NEXT J 560 DF=TD+TF: SI=TI-DF: S=64 570 PRINT CL$; 580 PRINT"Ok, at this point our table looks like this: ": PRINT 590 PRINT 600 GOSUB 2110: PRINT: PRINT TAB(19); 610 PRINT"RECURSIVE BUDGETING MODEL": PRINT: PRINT TAB(27)"* * *": PRINT 620 GOSUB 2110 630 PRINT:PRINT TAB(20)"SPENDABLE INCOME SUMMARY": PRINT 640 GOSUB 2100: PRINT TAB(3)"ACCOUNT"TAB(42)"PERIOD"TAB(57)"ANNUAL" 650 GOSUB 2100: PRINT"TOTAL INCOME"TAB(40); 660 PRINT USING W$;TI;:PRINT TAB(55); 670 PRINT USING W$;TI*P: PRINT:PRINT TAB(3)"PAYCHECK DEDUCTIONS"TAB(25); 680 PRINT USING W$;TD*(-1): PRINT 690 PRINT TAB(3)"FIXED EXPENSES"TAB(25);: PRINT USING W$;TF*(-1); 700 PRINT TAB(40);: PRINT USING W$;DF*(-1);: PRINT TAB(55); 710 PRINT USING W$;DF*(-1)*P 720 PRINT TAB(41)"-------"TAB(55)"--------":PRINT"SPENDABLE INCOME"; 730 PRINT TAB(40);:PRINT USING W$;SI;:PRINT TAB(55);:PRINT USING W$;SI*P 740 PRINT TAB(41)"========"TAB(55)"========":PRINT: 750 GOSUB 2110: PRINT: PRINT 760 GOSUB 2120 770 RO=0 780 PRINT:PRINT"Ok, now for the first round of variable expense. Don't" 790 PRINT"pinch yourself in your estimates (within reason). Let the" 800 PRINT"computer help you to refine your budget later on.": PRINT 810 FOR J=0 TO Q:READ E$(J):PRINT E$(J);" $";: INPUT"",V(J):VT=VT+V(J):NEXT J 820 RESTORE 830 PRINT:PRINT 840 PRINT"Your budget for the first round totalled $"VT". This" 850 PRINT"compares to spendable income of $"SI". We have" 860 PRINT"prorated the difference, $"SI-VT", over all variable expense" 870 PRINT"accounts.": PRINT 880 GOSUB 2120: FOR J=0 TO Q:V(J)=INT(V(J)/VT*SI): NEXT J: VT=SI: PRINT 890 PRINT CL$; 900 PRINT"Now we begin the budget refinement phase. Make as many" 910 PRINT"passes as you like. As you review each account, decide" 920 PRINT"whether to FREEZE it or leave it for another pass.": PRINT 930 PRINT"HINT: Don't be in a hurry to freeze an account.": PRINT 940 PRINT"Your task is finished when all accounts are frozen!": PRINT 950 GOSUB 2120 960 FOR J=0 TO Q: IF V(J)=0 THEN 1180 970 PRINT 980 PRINT E$(J);" $";V(J): INPUT"Change ('Y' or 'N') ",A$ 990 A$=LEFT$(A$,1) 1000 IF A$="N" THEN 1030 ELSE IF A$="Y" THEN 1010 ELSE 980 1010 INPUT"Revised amount $";A: IF A60 THEN A=60 2440 PRINT TAB(21);:FOR K=1 TO A: PRINT"]";:NEXT K: PRINT 2450 RETURN 2460 REM 2470 GOTO 2490 2480 REM 2490 PRINT: PRINT: 2500 END