home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / cpmug / cpmug054.ark / BIOCAL.BAS < prev    next >
Encoding:
BASIC Source File  |  1984-04-29  |  3.9 KB  |  154 lines

  1. 50 PRINT "--- Biorhythmic Calendar": PRINT
  2. 60 INPUT "Do you wish an introduction to biorythm";A$
  3. 65 IF LEFT(A$,1%)="N" THEN 98
  4. 70 PRINT
  5. 75 PRINT"The purpose of biorhythms is to predict physical, emotional, and"
  6. 77 PRINT"intellectual patterns that indicate your up and  down  days  for"
  7. 80 PRINT"any period of time.  Biorhythms can show which days were good or"
  8. 82 PRINT"bad for you beginning with your birth.  It  can  also  show  you"
  9. 85 PRINT"which future days will be good or bad for you.  When one of  the"
  10. 87 PRINT"cycles crosses the critical line the   transition  is thought to"
  11. 88 PRINT"increase the possibility of an accident, illness, etc.  The  'X'"
  12. 90 PRINT"by the dates on your chart indicate these critical days. Report-"
  13. 91 PRINT"ing the accuracy of this chart would  be  helpful  in  determing"
  14. 93 PRINT"the validity of the technique."
  15. 98 PRINT
  16. 100 DIM P1(23),P2(23),E1(28),E2(28),I1(33),I2(33)
  17. 110 DIM W$(7),L$(41),M$(12)
  18. 120 DATA "Sunday  #","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"
  19. 130 DATA "January","February","March","April","May","June","July","August","September","October","November","December"
  20. 140 FOR N=1 TO 23
  21. 150 P2(N)=SIN(6.283185307*(N-1)/23)
  22. 160 P1(N)=INT(21.5+20*P2(N))
  23. 170 NEXT N
  24. 180 FOR N=1 TO 28
  25. 190 E2(N)=SIN(6.283185307*(N-1)/28)
  26. 200 E1(N)=INT(21.5+20*E2(N))
  27. 210 NEXT N
  28. 220 FOR N=1 TO 33
  29. 230 I2(N)=SIN(6.283185307*(N-1)/33)
  30. 240 I1(N)=INT(21.5+20*I2(N))
  31. 250 NEXT N
  32. 260 FOR N=1 TO 7
  33. 270 READ W$(N)
  34. 280 NEXT N
  35. 290 FOR N=1 TO 12
  36. 300 READ M$(N)
  37. 310 NEXT N
  38. 320 FOR N=1 TO 41
  39. 330 L$(N)=" "
  40. 340 NEXT N
  41. 350 INPUT "Enter name";N$
  42. 370 INPUT "Enter date of birth  --( Mo, Day, Year )--";M,D,Y
  43. 380 IF Y<100 THEN Y=Y+1900
  44. 400 PRINT "Enter month and year for Biorhythmic Calendar. --( Month, Year )--";
  45. 410 INPUT M4,Y4
  46. 415 PRINT: PRINT
  47. 420 IF Y4<100 THEN Y4=Y4+1900
  48. 430 GOSUB 1350
  49. 440 M=M4
  50. 450 D=1
  51. 460 Y=Y4
  52. 470 GOSUB 980
  53. 480 S1=J
  54. 490 GOSUB 1350
  55. 500 L1=31
  56. 510 IF M4=12 THEN 570
  57. 520 GOSUB 1110
  58. 530 S3=N3
  59. 540 M=M4+1
  60. 550 GOSUB 1110
  61. 560 L1=N3-S3
  62. 570 B=J-S1+1
  63. 580 E=B+L1-1
  64. 585 Z$=Z$+MID(M$(M4),J1,1)+" " FOR J1=1 TO LEN(M$(M4))
  65. 588 Y$=Y$+MID(NUM1$(Y),J1,1)+" " FOR J1=1 TO 4
  66. 590 PRINT TAB(35-(LEN(Z$)/2));Z$
  67. 592 PRINT TAB(31);Y$
  68. 596 PRINT "     BIO"
  69. 600 PRINT "    INDEX    Down    -    -    Critical    -    -     Up"
  70. 610 PRINT TAB(13);"-....................0....................+"
  71. 630 V=0
  72. 640 FOR I=B TO E
  73. 650 V=V+1
  74. 660 J3=I-1
  75. 670 K1=INT(J3/23)
  76. 680 K2=J3-(K1*23)+1
  77. 690 K3=INT(J3/28)
  78. 700 K4=J3-(K3*28)+1
  79. 710 K5=INT(J3/33)
  80. 720 K6=J3-(K5*33)+1
  81. 730 P=P1(K2)
  82. 740 Q=E1(K4)
  83. 750 R=I1(K6)
  84. 760 O=P2(K2)+E2(K4)+I2(K6)
  85. 770 O=INT(16666*(O+3))+1
  86. 780 L$(21)="."
  87. 790 L$(P)="P"
  88. 800 L$(Q)="E"
  89. 810 L$(R)="I"
  90. 812 IF P>=19 THEN IF P<=24 THEN PRINT "X";
  91. 814 IF Q>=19 THEN IF Q<=24 THEN PRINT "X";
  92. 816 IF R>=20 THEN IF R<=23 THEN PRINT "X";
  93. 820 PRINT TAB(3); O;TAB(14);
  94. 830 FOR N=1 TO 41
  95. 840 PRINT TAB(11);L$(N);
  96. 850 NEXT N
  97. 860 PRINT TAB(58);V;TAB(62);W$(N2)
  98. 870 L$(P)=" "
  99. 880 L$(Q)=" "
  100. 890 L$(R)=" "
  101. 900 N2=N2+1
  102. 910 IF N2<8 THEN 930
  103. 920 N2=1
  104. 930 NEXT I
  105. 940 PRINT TAB(13);"-....................0....................+"
  106. 960 PRINT TAB(34-(LEN(N$)/2));N$
  107. 970 GOTO 1460
  108. 980 IF M<3 THEN 1020
  109. 990 M1=M-2
  110. 1000 Y1=Y
  111. 1010 GOTO 1040
  112. 1020 M1=M+10
  113. 1030 Y1=Y-1
  114. 1040 C=INT(Y1/100)
  115. 1050 D1=Y1-(C*100)
  116. 1060 N4=INT((13*M1-1)/5)+D+D1+INT(D1/4)
  117. 1070 N=N4+INT(C/4)-2*C+77
  118. 1080 N1=INT(N/7)
  119. 1090 N2=N-(N1*7)+1
  120. 1100 RETURN
  121. 1110 Y2=INT(Y/4)
  122. 1120 Y3=Y-(Y2*4)
  123. 1130 IF Y3=0 THEN 1150
  124. 1140 GOTO 1250
  125. 1150 Y2=INT(Y/100)
  126. 1160 Y3=Y-(Y2*100)
  127. 1170 IF Y3=0 THEN 1190
  128. 1180 GOTO 1230
  129. 1190 Y2=INT(Y/400)
  130. 1200 Y3=Y-(Y2*400)
  131. 1210 IF Y3=9 THEN 1230
  132. 1220 GOTO 1250
  133. 1230 L1=1
  134. 1240 GOTO 1260
  135. 1250 L1=0
  136. 1260 N1=INT((3055*(M+2))/100)-91
  137. 1270 L=0
  138. 1280 IF M<3 THEN 1330
  139. 1290 IF L1=0 THEN 1320
  140. 1300 L=1
  141. 1310 GOTO 1330
  142. 1320 L=2
  143. 1330 N3=N1+D-L
  144. 1340 RETURN
  145. 1350 IF M<3 THEN 1390
  146. 1360 M1=M-3
  147. 1370 Y1=Y
  148. 1380 GOTO 1410
  149. 1390 M1=M+9
  150. 1400 Y1=Y-1
  151. 1410 C=INT(Y1/100)
  152. 1420 D1=Y1-(C*100)
  153. 1430 N=INT((146097*C)/4)+D
  154.