home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 January to June / Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64 / biorhythm (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  101 lines

  1. 1 rem--ahoy--may issue--biorhythm--prog page 63
  2. 2 print"[147]"
  3. 4 v=53280:fort=0to30step.25:a=int(16+15*sin(t)):printtab(a);:print"biorhythm"
  4. 6 c=int(16*rnd(1))+1:pokev+1,c:next
  5. 8 pokev,6:pokev+1,8
  6. 10 print"[147]"spc(14);" biorhythm"
  7. 12 print""spc(9);"a program for the c-64"
  8. 14 print""spc(13);"by b.w.behling"
  9. 16 fori=0to2000:next
  10. 18 dimm(12):m(1)=31:m(2)=28:m(3)=31:m(4)=30:m(5)=31:m(6)=30:m(7)=31:m(8)=31
  11. 20 m(9)=30:m(10)=31:m(11)=30:m(12)=31:m(0)=0
  12. 22 print"[147]enter the birthdate in numbers."
  13. 24 print" example:"
  14. 26 print"         april 9, 1963 = 04/09/1963"
  15. 28 input" birthdate";bi$
  16. 30 rem empty line for frequent dates
  17. 32 rem empty line for frequent dates
  18. 34 rem empty line for frequent dates
  19. 36 rem empty line for frequent dates
  20. 38 rem empty line for frequent dates
  21. 40 print"[147]        enter date for biorhythm."
  22. 44 input" date";da$
  23. 45 iflen(bi$)<>10orlen(da$)<>10thengoto250
  24. 46 bm$=left$(bi$,2):bd$=mid$(bi$,4,2):by$=right$(bi$,4)
  25. 47 bm%=val(bm$)-1:bd%=val(bd$):by%=val(by$)
  26. 48 dm$=left$(da$,2):dd$=mid$(da$,4,2):dy$=right$(da$,4)
  27. 49 dm%=val(dm$)-1:dd%=val(dd$):dy%=val(dy$)
  28. 50 bl=by%/4:ifint(bl)=blthenbl=1:m(2)=29:goto54
  29. 52 bl=0:m(2)=28
  30. 54 bt%=bd%
  31. 56 fori=0tobm%:bt%=bt%+m(i):next
  32. 60 dl=dy%/4:ifint(dl)=dlthendl=1:m(2)=29:goto64
  33. 62 dl=0:m(2)=28
  34. 64 dt%=dd%
  35. 66 fori=0todm%:dt%=dt%+m(i):next
  36. 70 ifby%=dy%thentd%=dt%-bt%:goto90
  37. 72 ifbl=1thentd%=366-bt%:goto76
  38. 74 td%=365-bt%
  39. 76 yt%=(dy%-by%)-1
  40. 78 td%=td%+(int((yt%*365.25))+dt%)
  41. 90 ph=td%/23:ph=(ph-int(ph))*(2*3.1416):ph=sin(ph)
  42. 92 em=td%/28:em=(em-int(em))*(2*3.1416):em=sin(em):ifem<-.005orem>005thengoto94
  43. 93 em=0
  44. 94 in=td%/33:in=(in-int(in))*(2*3.1416):in=sin(in)
  45. 96 ph$=str$(ph):em$=str$(em):in$=str$(in):ph$=left$(ph$,4):em$=left$(em$,4)
  46. 98 in$=left$(in$,4)
  47. 100 print"[147] you have been alive"td%;"days!!"
  48. 102 print" your physical cycle value is  "ph$
  49. 104 print" your emotional cycle value is  "em$
  50. 106 print" your intellectual cycle value is  "in$
  51. 108 print" a value close to 1. is an 'up' value."
  52. 110 print" a value close to -1. is a 'down' value."
  53. 112 print" a value of 0 is considered critical!!"
  54. 114 print" hit [n] for another date."
  55. 118 print" hit space for 7 days forecast."
  56. 120 getk$:ifk$=""then120
  57. 122 ifk$="n"thenrun18
  58. 130 print"[147] day","physi.","emoti.","intel."
  59. 132 print" "td%,ph$,em$,in$
  60. 134 fori=1to7:td%=td%+1
  61. 136 ph=td%/23:ph=(ph-int(ph))*(2*3.1416):ph=sin(ph)
  62. 138 em=td%/28:em=(em-int(em))*(2*3.1416):em=sin(em):ifem<-.005orem>.005thengoto140
  63. 139 em=0
  64. 140 in=td%/33:in=(in-int(in))*(2*3.1416):in=sin(in)
  65. 142 ph$=str$(ph):em$=str$(em):in$=str$(in):ph$=left$(ph$,4):em$=left$(em$,4)
  66. 144 in$=left$(in$,4)
  67. 146 print" "td%,ph$,em$,in$
  68. 148 next
  69. 150 printspc(14);"**commands**"
  70. 151 print" [n] = new date."
  71. 152 print" [e] = end program."
  72. 154 print" [c] = to convert day # to date."
  73. 155 print" space = continue to next 7 days."
  74. 162 getk$:ifk$=""then162
  75. 164 ifk$="n"thenrun18
  76. 166 ifk$="c"then200
  77. 168 ifk$="e"thenend
  78. 170 goto130
  79. 200 input"[147] enter day # to be converted";dc%
  80. 205 td%=td%-7:iftd%<=dc%thengoto220
  81. 210 print" invalid day # !!!"
  82. 215 print" day # must be greater than";td%;"!!":fori=0to3500:next:goto200
  83. 220 ct%=dc%-td%:cm%=dm%+1:cd%=dd%:cy%=dy%
  84. 225 ifct%>(m(cm%)-cd%)thenct%=ct%-(m(cm%)-cd%):cm%=cm%+1:cd%=0
  85. 230 ifcm%>12thencm%=0:cy%=cy%+1:m(2)=28:ifcy%/4=int(cy%/4)thenm(2)=29
  86. 235 ifct%<=(m(cm%)-cd%)thencd%=cd%+ct%:goto245
  87. 240 goto225
  88. 245 print" date:"cm%;"/";cd%;"/";cy%
  89. 250 print" hit space to return to 7 day forecast."
  90. 255 print" hit [c] to convert another day."
  91. 260 getk$:ifk$=""then260
  92. 265 ifk$="c"thentd%=td%+7:goto200
  93. 270 goto130
  94. 275 print""
  95. 280 fori=1to5:print" error!!";:next
  96. 285 print" you must enter the complete date!!!"
  97. 290 print" all zeros must be included!!!"
  98. 300 print" hit space to reset."
  99. 305 getk$:ifk$=""then305
  100. 310 run18
  101.