Appears on
Assembled by Tim Ward from many sources. Contains programs 10294-10335.
Source Code
2 PRINT "INPT RAND NUMBER" 4 INPUT P 5 CLS 6 PRINT "RAND";P 7 RAND P 8 DIM H(1) 10 DIM D$(1,1) 20 DIM A$(6,1) 25 DIM X(6) 27 DIM M$(16,8) 30 DIM Q(1) 32 DIM E(1) 35 DIM R(1) 40 FOR Y=1 TO 4 50 LET X(Y)=INT (RND*2) 60 IF X(Y)=1 THEN LET A$(Y)="I" 70 IF X(Y)=0 THEN LET A$(Y)="O" 75 NEXT Y 80 LET U$=A$(1)+A$(2)+A$(3)+A$(4) 90 PRINT U$; 100 PRINT " "; 110 DIM N$(16,4) 120 LET N$(1)=U$ 200 LET W=INT (RND*4)+1 201 LET H(1)=H(1)+1 202 IF H(1)>50 THEN GOTO 750 203 LET D$(1)=A$(W) 205 DIM C$(1,1) 210 IF A$(W)="O" THEN LET C$(1)="I" 220 IF A$(W)="I" THEN LET C$(1)="O" 225 LET A$(W)=C$(1) 230 LET B$=A$(1)+A$(2)+A$(3)+A$(4) 340 LET R(1)=R(1)+1 350 GOTO 600 370 PRINT B$; 375 PRINT " "; 380 LET Q(1)=Q(1)+1 390 LET N$(Q(1)+1)=B$ 420 GOTO 200 600 FOR T=1 TO R(1) 610 IF B$=N$(T) THEN GOTO 700 620 NEXT T 630 GOTO 370 700 LET R(1)=R(1)-1 705 LET A$(W)=D$(1) 710 GOTO 200 750 FOR I=1 TO 16 752 LET L=I+1 754 IF I=16 THEN LET L=1 756 LET M$(I)=N$(I)+N$(L) 758 NEXT I 760 FOR C=1 TO 16 762 FOR H=1 TO 16 764 IF M$(C,1)=M$(C,5) AND M$(C,2)=M$(C,6) AND M$(C,1)=M$(H,1) AND M$(C,5)=M$(H,5) AND M$(C,2)=M$(H,2) AND M$(C,6)=M$(H,6) AND ((M$(C,3)<>M$(H,3) AND M$(C,7)<>M$(H,7)) OR (M$(C,4)<>M$(H,4) AND M$(C,8)<>M$(H,8))) THEN LET E(1)=E(1)+1 774 IF M$(C,1)=M$(C,5) AND M$(C,3)=M$(C,7) AND M$(C,1)=M$(H,1) AND M$(C,5)=M$(H,5) AND M$(C,3)=M$(H,3) AND M$(C,7)=M$(H,7) AND ((M$(C,2)<>M$(H,2) AND M$(C,6)<>M$(H,6)) OR (M$(C,4)<>M$(H,4) AND M$(C,8)<>M$(H,8))) THEN LET E(1)=E(1)+1 784 IF M$(C,2)=M$(C,6) AND M$(C,3)=M$(C,7) AND M$(C,2)=M$(H,2) AND M$(C,6)=M$(H,6) AND M$(C,3)=M$(H,3) AND M$(C,7)=M$(H,7) AND ((M$(C,1)<>M$(H,1) AND M$(C,5)<>M$(H,5)) OR (M$(C,4)<>M$(H,4) AND M$(C,8)<>M$(H,8))) THEN LET E(1)=E(1)+1 794 IF M$(C,2)=M$(C,6) AND M$(C,4)=M$(C,8) AND M$(C,2)=M$(H,2) AND M$(C,6)=M$(H,6) AND M$(C,4)=M$(H,4) AND M$(C,8)=M$(H,8) AND ((M$(C,1)<>M$(H,1) AND M$(C,5)<>M$(H,5)) OR (M$(C,3)<>M$(H,3) AND M$(C,7)<>M$(H,7))) THEN LET E(1)=E(1)+1 804 IF M$(C,3)=M$(C,7) AND M$(C,4)=M$(C,8) AND M$(C,3)=M$(H,3) AND M$(C,7)=M$(H,7) AND M$(C,4)=M$(H,4) AND M$(C,8)=M$(H,8) AND ((M$(C,1)<>M$(H,1) AND M$(C,5)<>M$(H,5)) OR (M$(C,2)<>M$(H,2) AND M$(C,6)<>M$(H,6))) THEN LET E(1)=E(1)+1 814 IF M$(C,1)=M$(C,5) AND M$(C,4)=M$(C,8) AND M$(C,1)=M$(H,1) AND M$(C,5)=M$(H,5) AND M$(C,4)=M$(H,4) AND M$(C,8)=M$(H,8) AND ((M$(C,3)<>M$(H,3) AND M$(C,7)<>M$(H,7)) OR (M$(C,2)<>M$(H,2) AND M$(C,6)<>M$(H,6))) THEN LET E(1)=E(1)+1 824 NEXT H 834 NEXT C 840 PRINT 850 PRINT "NUMBER OF SYMMETRICAL EDGES:";E(1) 860 PRINT 870 PRINT "NUMBER OF ASYMMETRICAL EDGES:";48-E(1) 880 STOP 890 CLEAR 900 SAVE "1030%9" 910 RUN