10 PRINTCHR$(147),CHR$(144):POKE53281,14 20 PRINTTAB(9)"AUTO: LEASING VS BUYING" 25 PRINTTAB(9):FOR J=1TO23:PRINT CHR$(183);:NEXT:PRINT:PRINT 30 PRINTTAB(13)"COST OF BUYING":PRINT:PRINT 35 PRINTTAB(3)"PLEASE ENTER DATA AS REQUESTED":PRINT:PRINT 40 INPUT" ENTER THE PURCHASE PRICE $ ";PP:PRINT 50 INPUT" WILL YOU NEED FINANCING? Y/N";F$:PRINT:IF F$="N" THEN 190 60 PRINT" DOWNPAYMENT INCLUDING TRADE-IN" 70 INPUT " ALLOWANCE $ ";DP:PRINT :LA=PP-DP 80 PRINT" YOU WILL NEED TO BORROW $";LA:PRINT 90 PRINT" WILL YOU NEED TO BORROW MORE TO" 95 PRINT" COVER SALES TAX, LICENSE, ETC.?" 100 INPUT" Y/N";H$:PRINT 105 IF H$="N" THEN LA=PP-DP: GOTO 140 110 PRINT" ENTER ADDITIONAL AMOUNT BORROWED" 120 INPUT "$ ";AB: LA=LA+AB :PRINT 140 PRINT" ANNUAL PERCENTAGE INTEREST RATE?" 150 INPUT " % ";R :PRINT 160 IF R>1 THEN R=R/100 170 PRINT" LENGTH OF LOAN IN MONTHS." 180 INPUT " MONTHS";M:PRINT 185 IF M>60 THEN PRINT"SORRY,60 MONTH LIMIT, PLEASE RE-ENTER":PRINT:GOTO 170 190 INPUT" SALES TAX RATE % ";SX:PRINT 200 IF SX>1 THEN SX=SX/100 210 INPUT" ANNUAL LICENSE FEE $ ";LC:PRINT 220 PRINT" WHAT TYPE OF CAR ARE YOU BUYING?":PRINT 230 PRINT" 1. STANDARD" 240 PRINT" 2. COMPACT" 250 PRINT" 3. SUBCOMPACT?":PRINT 260 INPUT"PLEASE ENTER NUMBER";N:PRINT 270 PRINT" DO YOU ITEMIZE YOUR DEDUCTIONS FOR" 280 INPUT" INCOME TAX PURPOSES? Y/N";Y$:PRINT 290 IF Y$="N" THEN 320 300 PRINT" ENTER YOUR TAX BRACKET RATE" 310 INPUT"%";TX:PRINT 320 IF TX>1 THEN TX=TX/100 370 PRINTCHR$(147) 380 PRINTTAB(12)"COST OF LEASING" 390 PRINTTAB(12):FORK=1TO15:PRINTCHR$(183);:NEXT:PRINT:PRINT 400 PRINTTAB(3)"PLEASE ENTER DATA AS REQUESTED":PRINT:PRINT 410 PRINT" ENTER SECURITY DEPOSIT REQUIRED" 415 INPUT" $";SD:PRINT 420 PRINT" ENTER MONTHLY LEASE PAYMENT" 425 INPUT" $";ML:PRINT 430 PRINT" FOR HOW MANY MONTHS?" 435 INPUT" MONTHS";NP:PRINT:IF F$="N" THEN M=NP 440 PRINT" DOWNPAYMENT OR ADDITIONAL PAYMENT" 450 INPUT" $";AP:PRINT 460 INPUT" ANNUAL LICENSE FEE $";LF:PRINT 470 GOSUB 1000 480 GOSUB 1300 510 GOSUB 1500:PRINT:PRINT 520 INPUT"PRESS 'C' TO CONTINUE";C$ 530 GOSUB 1800:PRINT:PRINT 540 INPUT"PRESS 'C' TO CONTINUE";C$ 550 PRINTCHR$(147):POKE 53280,2 560 PRINTTAB(5)"COMPARISON: LEASING VS. BUYING" 570 PRINTTAB(5):FORK=1TO30:PRINTCHR$(183);:NEXT:PRINT:PRINT 590 MP=INT(MP*100+.5)/100:X$=STR$(MP):GOSUB 3000 600 PRINT"YOUR MONTHLY LOAN PAYMENTS WOULD BE:":PRINT 610 PRINTTAB(10)"$";X$:PRINT 620 PRINT"YOUR MONTHLY LEASE PAYMENT WOULD BE:":PRINT 630 PRINTTAB(10)"$";ML:PRINT:PRINT 640 X$=STR$(TT):GOSUB 3000 650 PRINT"THE NET COST OF BUYING IS $";SPC(SP)X$:PRINT 660 X$=STR$(LT):GOSUB 3000 670 PRINT"THE NET COST OF LEASING IS $";SPC(SP)X$ 675 PRINTTAB(28);:FOR K=1TO9:PRINTCHR$(183);:NEXT:PRINT:PRINT 680 DF=LT-TT:X$=STR$(DF):GOSUB 3000 690 IF DF>0 THEN PRINT" BUYING IS CHEAPER BY $";SPC(SP)X$ 700 IF DF<0 THEN PRINT" LEASING IS CHEAPER BY $";SPC(SP)VAL(X$)*-1 900 END 1000 REM COST OF BUYING CALCULATIONS 1010 YR=M/12:MR=R/12:T=INT(YR) :TT=0:TD=0 1015 XL=(PP*(1+.055)^YR)-PP 1020 LI=(DP*(1+.055)^YR)-DP 1025 IF LA=0 THEN 1070 1030 F=(MR*(1+MR)^M)/((1+MR)^M-1) 1040 MP=F*LA 1050 IX=(MP*M)-LA 1060 IS=IX*TX 1070 SS=(SX*PP)*TX 1075 IF T>5 THEN PRINT"SORRY, 60 MONTH LIMIT":END 1080 IF N=1 THEN GOSUB 2000 1090 IF N=2 THEN GOSUB 2100 1100 IF N=3 THEN GOSUB 2200 1110 LC=LC*YR 1120 RETURN 1300 REM COMPUTE COST OF LEASING 1310 TL=ML*NP 1320 T1=INT(NP/12) 1330 IL=(SD*(1+.055)^T1)-SD 1340 IA=(AP*(1+.055)^T1)-AP 1350 LF=LF*T1 1360 RETURN 1500 REM DISPLAY BUYING RESULTS 1505 PRINTCHR$(147) 1510 PRINTTAB(13)"COST OF BUYING" 1515 PRINTTAB(13);:FOR K=1TO14:PRINTCHR$(183);:NEXT:PRINT:PRINT 1520 IF F$="N" THEN 2500 1525 DP=INT(DP):X$=STR$(DP):GOSUB 3000:TT=TT+DP 1530 PRINT"DOWNPAYMENT..................$";SPC(SP)X$ 1540 LI=INT(LI):X$=STR$(LI):GOSUB 3000:TT=TT+LI 1550 PRINT"INTEREST LOST ON DOWNPAYMENT..";SPC(SP)X$ 1560 TP=(M*MP)-AB:TP=INT(TP):X$=STR$(TP):GOSUB 3000 :TT=TT+TP 1570 PRINT"TOTAL PAYMENTS ON LOAN........";SPC(SP)X$ 1575 PRINT"[160][160](AUTO PORTION ONLY) 1580 SA[178]SX[172]PP:SA[178][181](SA):X$[178][196](SA):[141] 3000: TT[178]TT[170]SA 1590 [153]"SALES TAX ON PURCHASE.........";[166]SP)X$ 1593 LC[178][181](LC):X$[178][196](LC):[141] 3000:TT[178]TT[170]LC 1595 [153]"LICENSE FEES FOR ";[181](YR);"YEARS.....";[166]SP)X$ 1600 [153][163]29);:[129] K[178]1[164]10:[153] [199](183);:[130] 1610 X$[178][196](TT):[141] 3000 1620 [153]:[153][163]5)"TOTAL";[166]19)"$";[166]SP);X$ 1630 [153]:[153]"LESS:":[153] 1640 Z[178]PP[172](1[171]TD):Z[178][181](Z):X$[178][196](Z):[141] 3000:TT[178]TT[171]Z 1650 [153]"ESTIMATED RESIDUAL VALUE" 1660 [153]" OF THE CAR..............$";[166]SP)X$ 1665 [139] Y$[178]"N" [167] 1720 1670 IS[178][181](IS):X$[178][196](IS):[141] 3000:TT[178]TT[171]IS 1680 [153]"TAX SAVINGS ON INTEREST.......";[166]SP)X$ 1700 SS[178][181](SS):X$[178][196](SS):[141] 3000:TT[178]TT[171]SS 1710 [153]"TAX SAVINGS ON SALES TAX......";[166]SP)X$ 1720 [153][163]29):[129]K[178]1[164]10:[153][199](183);:[130]:[153] 1730 X$[178][196](TT):[141] 3000 1740 [153][163]5)"NET COST OF BUYING";[166]6)"$";[166]SP)X$ 1750 [142] 1800 [143] DISPLAY LEASING RESULTS 1810 [153][199](147) 1820 [153][163]12)"COST OF LEASING" 1830 [153][163]12):[129]K[178]1[164]15:[153][199](183);:[130]:[153]:[153] 1840 SD[178][181](SD):X$[178][196](SD):[141] 3000:LT[178]LT[170]SD 1850 [153]"SECURITY DEPOSIT.............$"[166]SP)X$ 1860 TL[178][181](TL):X$[178][196](TL):[141] 3000:LT[178]LT[170]TL 1870 [153]"TOTAL OF LEASE PAYMENTS.......";[166]SP)X$ 1880 IL[178][181](IL):X$[178][196](IL):[141] 3000:LT[178]LT[170]IL 1890 [153]"INTEREST LOST ON SECURITY DEP.";[166]SP)X$ 1891 [139] AP[178]0 [167]1906 1895 AP[178][181](AP):X$[178][196](AP):[141] 3000:LT[178]LT[170]AP 1898 [153]"ADDITIONAL REQUIRED PAYMENT...";[166]SP)X$ 1900 IA[178][181](IA):X$[178][196](IA):[141] 3000:LT[178]LT[170]IA 1903 [153]"LOST INTEREST ON ADD'L PAYMENT";[166]SP)X$ 1906 LF[178][181](LF):X$[178][196](LF):[141] 3000:LT[178]LT[170]LF 1907 [153]"LICENSE FEE FOR ";T1;"YEARS......";[166]SP)X$ 1909 [153][163]29):[129]K[178]1[164]10:[153][199](183);:[130]:[153] 1910 LT[178][181](LT):X$[178][196](LT):[141] 3000 1920 [153] [163]5)"TOTAL";[166]19)"$";[166]SP)X$ 1930 [153]:[153]"LESS:":[153] 1940 X$[178][196](SD):[141] 3000:LT[178]LT[171]SD 1950 [153]"RETURN OF SECURITY DEPOSIT...$";[166]SP)X$ 1955 [153][163]29):[129]K[178]1[164]10:[153][199](183);:[130]:[153] 1960 LT[178][181](LT):X$[178][196](LT):[141] 3000 1970 [153][163]5)"NET COST OF LEASING";[166]5)"$";[166]SP)X$ 1990 [142] 2000 A(1)[178].279:A(2)[178].146:A(3)[178].111:A(4)[178].099:A(5)[178].084 2010 [129] K[178]1[164]T:TD[178]TD[170]A(K):[130]:[142] 2100 B(1)[178].167:B(2)[178].126:B(3)[178].106:B(4)[178].099:B(5)[178].095 2110 [129] K[178]1[164]T:TD[178]TD[170]B(K):[130]:[142] 2200 C(1)[178].123:C(2)[178].115: C(3)[178].114:C(4)[178].107:C(5)[178].106 2220 [129] K[178]1[164]T:TD[178]TD[170]C(K):[130]:[142] 2500 [143] DISPLAY CASH PURCHASE RESULTS 2510 PP[178][181](PP):X$[178][196](PP):[141] 3000:TT[178]TT[170]PP 2520 [153]"PURCHASE PRICE...............$";[166]SP)X$ 2530 XL[178][181](XL):X$[178][196](XL):[141] 3000:TT[178]TT[170]XL 2540 [153]"INTEREST LOST ON PUR. PRICE...";[166]SP)X$ 2550 [137] 1580 3000 SP[178]9[171][195](X$):[142]