home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 September / 1992-09.d64 / polygons (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  75 lines

  1. 0 rem copyright 1992 - compute publications intl ltd - all rights reserved
  2. 5 printchr$(5)"[147]           *** polygons ***
  3. 10 [153][199](158)
  4. 20 [153]"              (NULL)valvalvalvalvalvalvalval(NULL)"
  5. 30 [153]"           a (NULL)          (NULL)"
  6. 50 [153]"            (NULL)atn=int angle (NULL) "
  7. 52 [153]"ab=diagonal (NULL)<tantan widthtantan>(NULL)"
  8. 55 [153]"            (NULL)  (a r e a) (NULL)"
  9. 57 [153]"             (NULL)          (NULL) b"
  10. 60 [153]"              (NULL)  side  (NULL)  "
  11. 70 [153]"               valvalvalvalvalvalvalval "
  12. 75 [153][199](5)
  13. 100 [133]"number of sides=";si
  14. 110 [139]si[179]4[167][153]"this program requires 4 or more sides":[128]
  15. 120 [153]"i already know: (one only)"
  16. 130 [153]"                1) side"
  17. 140 [153]"                2) width"
  18. 150 [153]"                3) diag."
  19. 160 [153]"                4) area"
  20. 170 [133]"category number=";ca
  21. 180 [139] ca[178](1)[167]220:[137]190
  22. 190 [139] ca[178](2)[167]330:[137]200
  23. 200 [139] ca[178](3)[167]410:[137]210
  24. 210 [139] ca[178](4)[167]510
  25. 220 c[178]360[173]si
  26. 230 a[178](180[171]c)[173]2
  27. 240 [133]"side dimension =";sd
  28. 250 r[178](sd[173][191](c[173](180[173][255])))[172][191](a[173](180[173][255]))
  29. 260 [139] (si)[173]2[179][177][181](si[173]2)[167][153]"diag. and width are not meaningful for  odd";
  30. 270 [139] (si)[173]2[179][177][181](si[173]2)[167][153]" numbers of sides because they do notpass ";
  31. 280 [139] (si[173]2)[179][177][181](si[173]2)[167][153]"through the center.":[137]310
  32. 290 [153]"diagonal       =";:[153]2[172](r)
  33. 300 [153]"width          =";:[153]2[172]([191](a[173](180[173][255])))[172](r)
  34. 310 [153]"area           =";:[153] (si)[172](sd)[172]([191](a[173](180[173][255])))[172](r)[173]2
  35. 320 [153]"internal angle =";180[171](360[173]si):[137]620
  36. 330 [133]"width          =";wd
  37. 340 [139](si)[173]2[179][177][181](si[173]2)[167][153]"you can't say width of odd sided figure.":[128]
  38. 350 h[178]wd[173]2
  39. 360 c[178]360[173]si[173]2
  40. 370 [153]"side           =";:[153]2[172](h[172]([192](c[173](180[173][255]))))
  41. 380 [153]"diagonal       =";:[153] h[173][190](c[173](180[173][255]))[172]2
  42. 390 [153]"area           =";:[153](h[172]([192](c[173](180[173][255]))))[172]h[172]si
  43. 400 [153]"internal angle =";180[171](360[173]si):[137]620
  44. 410 [133]"diagonal       =";di
  45. 420 b[178]360[173]si[173]2
  46. 430 a[178]90[171]b
  47. 440 [139](si[173]2)[179][177][181](si[173]2)[167][153]"you can't define width or diag of odd ";
  48. 450 [139](si[173]2)[179][177][181](si[173]2)[167][153]"  sided figure.":[128]
  49. 460 [153]"width          =";:[153](di)[172][191](a[173](180[173][255]))
  50. 470 [153]"side           =";:[153]((di[173]2)[172][190](a[173](180[173][255])))[172]2
  51. 480 ar[178]((di)[172][191](a[173](180[173][255])))[172]((di[173]2)[172][190](a[173](180[173][255])))[172]si[173]2
  52. 490 [153]"area           =";:[153](ar)
  53. 500 [153]"internal angle =";180[171](360[173]si):[137]620
  54. 510 [133]"area           =";ar
  55. 520 at[178]ar[173]si[173]2
  56. 530 b[178]360[173]si[173]2
  57. 540 a[178]90[171]b
  58. 550 [153]"side           =";2[172]([186](2[172]at[172][192](b[173](180[173][255]))))
  59. 560 [139](si[173]2)[178][181](si[173]2)[167]590
  60. 570 [139](si)[173]2[179][177][181]((si)[173]2)[167][153]"odd number sides has no width or";
  61. 580 [153]" diag.  defined.":[137]610
  62. 590 [153]"diagonal       =";2[172]([186](2[172]at[172][192](b[173](180[173][255]))))[173][191](b[173](180[173][255]))
  63. 600 [153]"width          =";([186](2[172]at[172][192](b[173](180[173][255]))))[172][192](a[173](180[173][255]))[172]2
  64. 610 [153]"internal angle =";180[171](360[173]si)
  65. 620 [133]"another problem (a), hardcopy (h) or    quit (q)";e$
  66. 625 [139]e$[179][177]"a"[175]e$[179][177]"h"[175]e$[179][177]"q"[167][153]"* only 'a' or 'h' or 'q' *":[137]620
  67. 630 [139]e$[178]"a"[167][137]0
  68. 640 [139]e$[178]"h"[167][141]60035
  69. 650 [139]e$[178]"q"[167][153][199](30):[153]"load* thanks. i'd be glad to help again *":[128]
  70. 60035 a$[178]"":[159]4,4:z[178]1023:[129]y[178]0[164]24:[129]x[178]0[164]39:z[178]z[170]1
  71. 60040 ch[178][194](z):[139]ch[177]128[167]ch[178]ch[171]128
  72. 60050 [139]ch[179]32[176]ch[177]95[167]ch[178]ch[170]64:[137]60070
  73. 60060 [139]ch[177]63[175]ch[179]96[167]ch[178]ch[170]32
  74. 60070 a$[178]a$[170][199](ch):[130]:[152]4,a$:a$[178]"":[130]:[160]4
  75.