Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_30.ADF » P/LOTTERY
P/LOTTERY
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_30.ADF |
Filename: | P/LOTTERY |
Read OK: | ✔ |
File size: | 0257 bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
File contents
10MODE3 20 DIM Q(50) 30 A%=RND(TIME) 40 FOR G=1TO50 50 LET A=RND(49) 60 LET B=RND(49) 70IF A=B THEN50 80LET C=RND(49) 90 IF A=C THEN50 100 IFB=C THEN50 110 LET D=RND(49) 120 IF A=D THEN 50 130 IF B=D THEN 50 140 IF C=D THEN 50 150 LET E=RND(49) 160 IF A=E THEN 50 170 IF B=E THEN 50 180 IF C=E THEN 50 190 IF D=E THEN 50 200 LET F=RND(49) 210 IF A=F THEN 50 220 IF B=F THEN 50 230 IF C=F THEN 50 240 IF D=F THEN 50 250 IF E=F THEN 50 260LET Q(1)=A 270LET Q(2)=B 280LET Q(3)=C 290LET Q(4)=D 300LET Q(5)=E 310LET Q(6)=F 312FORK=1 TO 5 314 FOR L=K+1 TO 6 316 IF Q(L) >= Q(K) THEN 324 318 T=Q(L) 320 Q(L)=Q(K) 322 Q(K)=T 324 NEXT L 326 NEXTK 350 FOR V=1TO 6 352 PRINT Q(V); 354NEXT V 355PRINT 360NEXT G
�3 � Q(50) A%=�(�) ( � G=1�50 2 � A=�(49) < � B=�(49) F� A=B ��Tr@ P � C=�(49) Z � A=C ��Tr@ d �B=C ��Tr@ n � D=�(49) x � A=D � �Tr@ � � B=D � �Tr@ � � C=D � �Tr@ � � E=�(49) � � A=E � �Tr@ � � B=E � �Tr@ � � C=E � �Tr@ � � D=E � �Tr@ � � F=�(49) � � A=F � �Tr@ � � B=F � �Tr@ � � C=F � �Tr@ � � D=F � �Tr@ � � E=F � �Tr@ � Q(1)=A � Q(2)=B � Q(3)=C "� Q(4)=D ,� Q(5)=E 6� Q(6)=F 8�K=1 � 5 : � L=K+1 � 6 < � Q(L) >= Q(K) � �DDA > T=Q(L) @ Q(L)=Q(K) B Q(K)=T D � L F �K ^ � V=1� 6 ` � Q(V); b� V c� h� G �
00000000 0d 00 0a 06 eb 33 0d 00 14 0c 20 de 20 51 28 35 |.....3.... . Q(5| 00000010 30 29 0d 00 1e 0c 20 41 25 3d b3 28 91 29 0d 00 |0).... A%=.(.)..| 00000020 28 0d 20 e3 20 47 3d 31 b8 35 30 0d 00 32 0e 20 |(. . G=1.50..2. | 00000030 e9 20 41 3d b3 28 34 39 29 0d 00 3c 0e 20 e9 20 |. A=.(49)..<. . | 00000040 42 3d b3 28 34 39 29 0d 00 46 0f e7 20 41 3d 42 |B=.(49)..F.. A=B| 00000050 20 8c 8d 54 72 40 0d 00 50 0d e9 20 43 3d b3 28 | ..Tr@..P.. C=.(| 00000060 34 39 29 0d 00 5a 10 20 e7 20 41 3d 43 20 8c 8d |49)..Z. . A=C ..| 00000070 54 72 40 0d 00 64 0f 20 e7 42 3d 43 20 8c 8d 54 |Tr@..d. .B=C ..T| 00000080 72 40 0d 00 6e 0e 20 e9 20 44 3d b3 28 34 39 29 |r@..n. . D=.(49)| 00000090 0d 00 78 11 20 e7 20 41 3d 44 20 8c 20 8d 54 72 |..x. . A=D . .Tr| 000000a0 40 0d 00 82 11 20 e7 20 42 3d 44 20 8c 20 8d 54 |@.... . B=D . .T| 000000b0 72 40 0d 00 8c 11 20 e7 20 43 3d 44 20 8c 20 8d |r@.... . C=D . .| 000000c0 54 72 40 0d 00 96 0e 20 e9 20 45 3d b3 28 34 39 |Tr@.... . E=.(49| 000000d0 29 0d 00 a0 11 20 e7 20 41 3d 45 20 8c 20 8d 54 |).... . A=E . .T| 000000e0 72 40 0d 00 aa 11 20 e7 20 42 3d 45 20 8c 20 8d |r@.... . B=E . .| 000000f0 54 72 40 0d 00 b4 11 20 e7 20 43 3d 45 20 8c 20 |Tr@.... . C=E . | 00000100 8d 54 72 40 0d 00 be 11 20 e7 20 44 3d 45 20 8c |.Tr@.... . D=E .| 00000110 20 8d 54 72 40 0d 00 c8 0e 20 e9 20 46 3d b3 28 | .Tr@.... . F=.(| 00000120 34 39 29 0d 00 d2 11 20 e7 20 41 3d 46 20 8c 20 |49).... . A=F . | 00000130 8d 54 72 40 0d 00 dc 11 20 e7 20 42 3d 46 20 8c |.Tr@.... . B=F .| 00000140 20 8d 54 72 40 0d 00 e6 11 20 e7 20 43 3d 46 20 | .Tr@.... . C=F | 00000150 8c 20 8d 54 72 40 0d 00 f0 11 20 e7 20 44 3d 46 |. .Tr@.... . D=F| 00000160 20 8c 20 8d 54 72 40 0d 00 fa 11 20 e7 20 45 3d | . .Tr@.... . E=| 00000170 46 20 8c 20 8d 54 72 40 0d 01 04 0c e9 20 51 28 |F . .Tr@..... Q(| 00000180 31 29 3d 41 0d 01 0e 0c e9 20 51 28 32 29 3d 42 |1)=A..... Q(2)=B| 00000190 0d 01 18 0c e9 20 51 28 33 29 3d 43 0d 01 22 0c |..... Q(3)=C..".| 000001a0 e9 20 51 28 34 29 3d 44 0d 01 2c 0c e9 20 51 28 |. Q(4)=D..,.. Q(| 000001b0 35 29 3d 45 0d 01 36 0c e9 20 51 28 36 29 3d 46 |5)=E..6.. Q(6)=F| 000001c0 0d 01 38 0c e3 4b 3d 31 20 b8 20 35 0d 01 3a 10 |..8..K=1 . 5..:.| 000001d0 20 e3 20 4c 3d 4b 2b 31 20 b8 20 36 0d 01 3c 1a | . L=K+1 . 6..<.| 000001e0 20 e7 20 51 28 4c 29 20 3e 3d 20 51 28 4b 29 20 | . Q(L) >= Q(K) | 000001f0 8c 20 8d 44 44 41 0d 01 3e 0b 20 54 3d 51 28 4c |. .DDA..>. T=Q(L| 00000200 29 0d 01 40 0e 20 51 28 4c 29 3d 51 28 4b 29 0d |)..@. Q(L)=Q(K).| 00000210 01 42 0b 20 51 28 4b 29 3d 54 0d 01 44 08 20 ed |.B. Q(K)=T..D. .| 00000220 20 4c 0d 01 46 07 20 ed 4b 0d 01 5e 0d 20 e3 20 | L..F. .K..^. . | 00000230 56 3d 31 b8 20 36 0d 01 60 0c 20 f1 20 51 28 56 |V=1. 6..`. . Q(V| 00000240 29 3b 0d 01 62 07 ed 20 56 0d 01 63 05 f1 0d 01 |);..b.. V..c....| 00000250 68 07 ed 20 47 0d ff |h.. G..| 00000257