home *** CD-ROM | disk | FTP | other *** search
- 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]
-