10 LET R1=(360/33)/57.2958
20 LET R2=(360/28)/57.2958
30 LET R3=(360/23)/57.2958
40 PRINT CHR$(26):PRINT:PRINT:PRINT
50 PRINT "******************** BIO-RHYTHM ********************"
60 PRINT:PRINT
70 PRINT "TO GENERATE A BIO-RHYTHM:"
80 PRINT
90 PRINT "     - Type in the subject's birthday, a comma and the "
100 PRINT "         current date."
110 PRINT "     - Enter the number of days you want to cover."
120 PRINT "     - Enter the name of the subject."
130 PRINT:PRINT:PRINT:PRINT
140 DATA 0,31,59,90,120,151,181,212,243,273,304,334
150 DATA 365
160 DIM L$(50)
170 GOTO 240
180 PRINT "Do you want another Bio-rhythm?";
190 INPUT " (YES or NO)";ANS$
200 IF LEFT$(ANS$,1)="N" THEN SYSTEM
210 IF LEFT$(ANS$,1)="n" THEN SYSTEM
220 PRINT CHR$(26);
230 PRINT:PRINT:PRINT
240 RESTORE
250 PRINT"Enter birthday - comma - current date  (YYMMDD,YYMMDD)"
260 LET P1=0
270 LET J6=1
280 INPUT D1,D2
290 LET D9=D2
300 PRINT"Enter duration "
310 INPUT J5
320 PRINT"Enter name of subject "
330 INPUT A$
340 GOSUB 1310
350 IF D1>D2 THEN PRINT" INVALID DATES "
360 LET X1=D1
370 GOSUB 430
380 LET Y1=X2:LETM1=X3:LET D1=X4
390 LET X1=D2
400 GOSUB 430
410 LET Y2=X2:LETM2=X3:LETD2=X4
420 GOSUB 470
430 LET X2=INT(X1/10000)
440 LET X3=INT(X1/100)-(X2*100)
450 LET X4=X1-((X3*100)+(X2*10000))
460 RETURN
470 LET D4=(INT((Y2-1)*365.25)-INT((Y1-1)*365.25))
480 FOR I=1 TO M1
490 READ J1
500 NEXT I
510 RESTORE
520 FOR I =1 TO M2
530 READ J2
540 NEXT I
550 LET J1=J1+D1
560 LET J2=J2+D2
570 LET L1=(Y1/4)-(INT(Y1/4))
580 IF L1=0 THEN LET L1=1:GOTO 600
590 LET L1=0
600 LET L2=(Y2/4)-(INT(Y2/4))
610 IF L2=0 THEN LET L2=1:GOTO 630
620 LET L2=0
630 IF M1>2 THEN LET J1=J1+L1
640 IF M2>2 THEN LET J2=J2+L2
650 LET D4=D4+J2-J1
660 LET D1=(D4-(INT(D4/33)*33))
670 LET D2=(D4-(INT(D4/28)*28))
680 LET D3=(D4-(INT(D4/23)*23))
690 FOR L3=1 TO 50 
700 FOR I= 1 TO 50
710 LET L$(I)=" "
720 NEXT I
730 LET X=SIN(R1*D1)
740 LET Y=SIN(R2*D2)
750 LET Z=SIN(R3*D3)
760 LET L$(X*20+25)="M"
770 LET L$(Y*20+25)="E"
780 LET L$(Z*20+25)="P"
790 PRINT":  ";
800 FOR I=1 TO 50
810 LET L$(25)="I"
820 PRINT L$(I);
830 NEXT I
840 PRINT": ";
850 GOSUB 1130:PRINT D5;" :   ";
860 IF D1=0 THEN LET C=1:PRINT"M ";
870 IF D1=16 THEN LET C=1:PRINT"M ";
880 IF D2=0 THEN LET C=1:PRINT"E ";
890 IF D2=14 THEN LET C=1:PRINT"E ";
900 IF D3=0 THEN LET C=1:PRINT"P ";
910 IF D3=12 THEN LET C=1:PRINT"P ";
920 IF C=1 THEN LET C=0
930 PRINT
940 LET D1=D1+1
950 LET D2=D2+1
960 LET D3=D3+1
970 IF D1=33 THEN LET D1=0
980 IF D2=28 THEN LET D2=0
990 IF D3=23 THEN LET D3=0
1000 LET J2=J2+1
1010 LET J6=J6+1
1020 IF J5<J6 GOTO 1090
1030 NEXT L3
1040 LET P1=P1+1
1050 GOSUB 1600
1060 PRINT:PRINT
1070 GOSUB 1310
1080 GOTO 690
1090 LET P1=P1+1
1100 GOSUB 1600
1110 PRINT:PRINT
1120 GOTO 180
1130 RESTORE
1140 FOR I =1 TO 13
1150 LET J4=J3
1160 READ J3
1170 IF J2>59 THEN LET J3=J3+L2
1180 IF J2<=J3 GOTO 1260
1190 NEXT I
1200 LET Y2=Y2+1
1210 LET L2=(Y2/4)-(INT(Y2/4))
1220 IF L2=0 THEN LET L2=1:GOTO 1240
1230 LET L2=0
1240 LET J2=J2-365
1250 GOTO 1130
1260 LET M2=I-1
1270 LET D6=J2-J4
1280 IF J2=60 THEN LET D6=D6+L2
1290 LET D5=Y2*10000+(M2*100)+D6
1300 RETURN
1310 FOR I=1 TO 70
1320 PRINT"-";
1330 NEXT I
1340 PRINT
1350 PRINT": Computerized study of Biorhythmic curves by Elmer ";
1360 GOSUB 1540
1370 PRINT": Subject, ";A$;
1380 GOSUB 1540
1390 PRINT ": Date of study- ";D9;"- Duration ";J5;"days ";
1400 GOSUB 1540
1410 FOR I=1 TO 70:PRINT"-";:NEXT I:PRINT
1420 PRINT":         P=PHYSICAL      E=EMOTIONAL        M=MENTAL ";
1430 PRINT TAB(69)":"
1440 FOR I=1 TO 70:PRINT"-";:NEXT I
1450 PRINT
1460 PRINT":           LOW           :          HIGH             :";
1470 PRINT"  DATE   :CRTICL";
1480 PRINT":"
1490 FOR I=1 TO 70
1500 PRINT"-";
1510 NEXT I
1520 PRINT
1530 RETURN
1540 LET J=70-POS(X)
1550 FOR I=1 TO J-1
1560 PRINT" ";
1570 NEXT I
1580 PRINT":"
1590 RETURN
1600 FOR I=1 TO 70:PRINT"-";:NEXT I:PRINT
1610 PRINT": HIGH    -    Days of full vitality, efficiency, ";  
1620 PRINT"and high endurance";  
1630 GOSUB 1540
1640 PRINT": LOW     -    Days of reduced efficiency, recuperation, ";
1650 PRINT"tire easily";
1660 GOSUB 1540
1670 PRINT": CRITICAL  -  Days to avoid situations that might ";  
1680 PRINT"lead to trouble";  
1690 GOSUB 1540
1700 FOR I=1 TO 70:PRINT"-";:NEXT I:PRINT
1710 PRINT TAB(31);"PAGE ";P1
1720 RETURN
T"lead to trouble";  
16