home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 July to December / Ahoy_Magazine_84-Jul-Dec_1984_Double_L_unofficial.d64 / biorhythm (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  100 lines

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