home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 May / 1992-05.d64 / amortization (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  879b  |  31 lines

  1. 0 clr
  2. 10 poke53280,6:poke646,1:goto30
  3. 20 printqtab(t1)ntab(t2)jtab(t3)b:return
  4. 30 c=12:t1=5:t2=16:t3=27
  5. 40 h=100:d=.5
  6. 50 input"[147]amount of loan";b:ifb=<0thenrun
  7. 60 input"annual interest rate";ai:i=ai/1200:ifi=<0thenrun
  8. 70 input"no. of years on loan";y:m=y*12:ifm=<0thenrun
  9. 80 p=(int(h*b*(i+i/((i+1)^m-1))+d))/h
  10. 90 print"monthly payment should be $";p
  11. 100 print"(press return to use above payment)"
  12. 110 input"actual payment";ap$:ifap$=""then130
  13. 120 p=val(ap$)
  14. 130 print"see monthly or yearly (m/y)?"
  15. 140 geta$:ifa$<>"y"thenifa$<>"m"then140
  16. 150 print"[147]"
  17. 160 print" (hold space bar to see entries)"
  18. 170 print" mo."tab(t1)" principal"tab(t2)" interest"tab(t3)" balance"
  19. 180 print" --------------------------------------
  20. 190 q[178]q[170]1
  21. 200 [161]b$:[139]b$[179][177]" "[167]200
  22. 210 j[178][181]((i[172]b)[172]h[170]d)[173]h
  23. 220 n[178][181]((p[171]j)[172]h[170]d)[173]h
  24. 230 b[178][181]((b[171]n)[172]h[170]d)[173]h
  25. 240 [139]b[179]0[167][128]
  26. 250 [139]a$[178]"m"[167][141]20:[137]270
  27. 260 [139][181](q[173]c)[178]q[173]c[167][141]20
  28. 270 [137]190
  29. 280 [153]" --------------------------------------
  30. 290 print" mo."tab(t1)" principal"tab(t2)" interest"tab(t3)" balance"
  31.