	REM---------------------------------------------------
	REM		B  I  O  R  H  Y  T  H  M
	REM---------------------------------------------------

	REM		JUNE 14, 1977

1 DIM A(13),M$(13),DAY$(8),D$(8),F(5),F$(5)
2 DATA 0,31,59,90,120,151,181,212,243,273,304,334
3 FOR I=1 TO 12: READ A(I): NEXT
	FOR I=0 TO 6 : READ DAY$(I) : NEXT I
	FOR I=0 TO 6 : READ D$(I) : NEXT I
	FOR I=1 TO 12 : READ M$(I) : NEXT I
5 PI=3.14159
7 PRINT: PRINT
10 PRINT"THIS PROGRAM WILL PRINT OUT YOUR PERSONAL BIO-RHYTHM"
11 PRINT"ANALYSIS FOR A 30 DAY PERIOD STARTING AT ANY DATE YOU"
20 PRINT"SELECT.  DATES SHOULD BE ENTERED IN NUMERICAL FORM WITH"
30 PRINT"THE MONTH DAY AND YEAR SEPARATED BY COMMAS.  I.E. JULY"
40 PRINT"4, 1976 WOULD BE ENTERED AS 7, 4, 76."
70 PRINT:PRINT
80 PRINT"WHAT IS THE DATE AT WHICH YOU WOULD LIKE THE 30 DAY"
90 PRINT"ANALYSIS TO START";
100 INPUT M,D,Y
105 M=INT(M): D=INT(D): Y=INT(Y)
110 INPUT"WHAT IS THE DATE OF YOUR BIRTH";MB, DB, YB
115 MB=INT(MB): DB=INT(DB): YB=INT(YB)
117 INPUT"WHAT IS YOUR NAME";A$
120 PRINT CHR$(12)
130 DEF FNI(X)=INT(20*SIN(2*PI*X/33)+.5)
140 DEF FNE(X)=INT(20*SIN(2*PI*X/28)+.5)
150 DEF FNP(X)=INT(20*SIN(2*PI*X/23)+.5)
160 T=INT(D+365.25*Y+A(M)+.01*MB-.03)
170 TB=INT(DB+365.25*YB+A(MB)+.01*MB-.03)
180 X=T-TB
183 V=INT((40-LEN(A$))/2)
184 RB=TB-1-INT((TB-1)/7)*7
210 DATA MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY
211 DATA SATURDAY, SUNDAY
240 DATA MON , TUE , WED , THU , FRI , SAT , SUN 
260 DATA JANUARY ,FEBRUARY ,MARCH ,APRIL ,MAY ,JUNE ,JULY 
265 DATA AUGUST 
	PRINT "    ";
900	PRINT "*";
	IF POS<62 THEN 900
	PRINT
	PRINT "   ";
910	PRINT "*";
	IF POS<63 THEN 910
	PRINT
	PRINT "  *****";TAB(59);"*****"
270 DATA SEPTEMBER ,OCTOBER ,NOVEMBER ,DECEMBER 
	PRINT "  ****";TAB(V);
	PRINT "BIO-RHYTHM ANALYSIS FOR ";A$;TAB(60);"****"
	PRINT "  ***";TAB(61);"***"
280	R=INT(T-1-INT((T-1)/7)*7)
282 N=21+LEN(DAY$(R))+LEN(M$(M))+LEN(STR$(D))
283 EN=N+LEN(RIGHT$(STR$(Y),2))
284 V2=INT((64-EN)/2)
	PRINT "  **";TAB(V2);
	PRINT " STARTING DATE: ";DAY$(R);", ";M$(M);LEFT$(STR$(D),2);", 19";
	PRINT LEFT$(STR$(Y),2);
	PRINT TAB(62);"**"
299 N1=LEN(DAY$(RB))+LEN(M$(MB))+LEN(STR$(DB))
300 LL=N1+LEN(RIGHT$(STR$(YB),2))
301 LB=LL+18
302 VB=INT((64-LB)/2)
	PRINT "  ***";TAB(61);"***"
	PRINT "  ****";TAB(VB);
	PRINT " BIRTH DATE: ";DAY$(RB);", ";M$(MB);LEFT$(STR$(DB),2);", 19";
	PRINT LEFT$(STR$(YB),2);
	PRINT TAB(60);"****"
	PRINT "  *****";TAB(59);"*****"
	PRINT "   ";:FOR I=POS TO 62 : PRINT "*"; : NEXT I
	PRINT
	PRINT "    ";
	FOR I=POS TO 61 : PRINT "*"; : NEXT I
	PRINT : PRINT : PRINT : PRINT
	PRINT "  ";
920	PRINT"*";
	IF POS<64 THEN 920
	PRINT
	PRINT : PRINT : PRINT
	PRINT "GRAPH SYMBOLS:"
	PRINT "	*:  MEDIAN LINE";TAB(30);"(0 LINE)"
	PRINT " P:  PHYSICAL LINE";TAB(30);"(23 DAY CYCLE)"
	PRINT " E:  EMOTIONAL LINE";TAB(30);"(28 DAY CYCLE)"
	PRINT " I:  INTELLECTUAL LINE";TAB(30);"(33 DAY CYCLE)"
	PRINT " X:  MEANS THAT TWO OR THREE SYMBOLS COINCIDE"
	PRINT : PRINT : PRINT
	PRINT "THE UP (PLUS) CYCLE PERIODS IN THE THREE CYCLES ARE THE TIMES WHEN YOU"
	PRINT "SHOULD BE MORE ALERT, OUTGOING, AND CHEERFUL.  THE DOWN (MINUS) "
	PRINT "PERIODS ARE TIMES FOR RECUPERATION.  THE DAYS ON WHICH THE MEDIAN"
	PRINT "LINE IS CROSSED ARE CALLED CRITICAL (+) DAYS, ESPECIALLY FOR THE"
	PRINT "PHYSICAL AND SENSITIVITY CYCLES.  ACCIDENTS ARE MOST LIKELY TO"
	PRINT "OCCUR ON THESE DAYS.  MANY MAJOR TRANSPORTATION COMPANIES ARE"
	PRINT "REDUCING THEIR ACCIDENT RATES BY WARNING THEIR DRIVERS OR PILOTS"
	PRINT "ABOUT CRITICAL DAYS."
	PRINT : PRINT : PRINT "  "
309	PRINT "*";
	IF POS<64 THEN 309
	PRINT : PRINT
 PRINT TAB(20);"DOWN";TAB(40);"CRITICAL";TAB(61);"UP"
310	R=INT(R) : D=INT(D) : M=INT(M)
	PRINT D$(R);D;M$(M);
320 F(0)=42:F$(0)="*"
330 F(1)=42+FNI(X):F$(1)="I"
340 F(2)=42+FNE(X):F$(2)="E"
350 F(3)=42+FNP(X):F$(3)="P"
360 FOR I=0 TO 2
370 FOR J=I+1 TO 3
380 IF F(I)<F(J) THEN 420
385 IF F(I)<>F(J) THEN 390
    LET F(I)=0 : F$(I)="" : F$(J)="X"
    GOTO 420
390 Q=F(I): Q$=F$(I)
400 F(I)=F(J): F$(I)=F$(J)
410 F(J)=Q: F$(J)=Q$
420 NEXT J: NEXT I
440 FOR I=0 TO 3
    IF F(I)=0 THEN 460
	IF F(I)=42 AND F$(I)="X" THEN LET F$(I)="+"
    IF F(I)=POS THEN 455
450 PRINT TAB(F(I));
455 PRINT F$(I);
460 NEXT
470 PRINT : X=X+.5
    IF X<>(INT(X)) THEN 320
475 IF Z=29 THEN 570
480 R=R+1
    IF R=7 THEN LET R=0
490	D=INT(D+1)
    IF (M=4) OR (M=6) OR (M=11) THEN LET L=30 : GOTO 530
500 IF M=2 AND Y/4=INT(Y/4) THEN LET L=29:GOTO 530
510 IF M=2 THEN L=28: GOTO 530
520 L=31
530 IF D>L THEN D=D-L:M=M+1: GOTO 550
540 PRINT D$(R);D;:Z=Z+1: GOTO 320
550 IF M=13 THEN M=1: Z=Z+1: GOTO 310
560 Z=Z+1: GOTO 310
570 PRINT: PRINT
    PRINT "  ";
    FOR I=POS TO 64: PRINT "*"; : NEXT I
	PRINT : PRINT : PRINT
	PRINT CHR$(12)
	INPUT "DO YOU WISH ANOTHER BIORHYTHM";R$
	IF LEFT$(R$,1)<>"Y" THEN 580
	Z=0
	GOTO 7
580 END
