10 REM"LOTTERY 20 REM J.Davis '94. 30 REM"An anagram ofNational Lottery isTotally Inane Rot. 40 MODE7 50 DIMA(6) 60 DIMK(7) 70 VDU23,1,0;0;0;0; 80 LKN=1 90 PRINTTAB(14)"LOTTERY":PRINTTAB(14)"LOTTERY" 100 PRINTCHR$(145);STRING$(39,"s") 110 PRINT" If you plan to have a go at theNational Lottery and you would likeyour Beeb to choose your numbers foryou, this program will make your lifea little easier. Unfortunately, itwon't improve the odds..." 120 PRINT" If you should happen to win zillionsusing this program, I claim 10%. If youdon't win anything, I disclaim allresponsibility for everything from theBig Bang to the end of time. Just blameyour computer, "; 130 PRINT"or sunspots, or yourbudgie." 140 PRINTCHR$(145);STRING$(39,","); 150 PRINT" If you would like to include your lucky number in the randomising factor, press 'L', or press SPACE to run." 160 PRINTCHR$(145);STRING$(39,","); 170 PRINT"Also see note at end of listing." 180 PRINTCHR$(145);STRING$(39,"s"); 190 G$=GET$:IFG$<>"L" CLS:GOTO250 200 MODE7 210 PRINTTAB(1,4)"PLEASE ENTER YOUR LUCKY NUMBER " 220 PRINTTAB(1,6)"* * * * * * " 230 PRINTTAB(18,6); 240 INPUT""LKN 250 VDU23,1,0;0;0;0; 260 X=129:Y=135 270 FORN=1TO20 280 PRINTTAB(8,11);CHR$(141);CHR$(X);CHR$(157);CHR$(Y)"* GOOD LUCK * " 290 Z=X:X=Y:Y=Z 300 FORD=1TO100:NEXT 310 PRINTTAB(8,12);CHR$(141);CHR$(X);CHR$(157);CHR$(Y)"* GOOD LUCK * " 320 FORD=1TO100:NEXT 330 NEXT 340 CLS 350 T=ABS(TIME*LKN) 360 IFT=0 OR T>2E9 T=ABS(TIME) 370 Z=RND(-T) 380 B=0:FL%=0 390 V%=0:W%=22 400 FORN=1TO7:K(N)=144+N:NEXT 410 PROCgrid 420 FORN=1TO6 430 FORM=1TO20+RND(20) 440 A%=RND(49) 450 PROCcheck 460 IFFL%=1 FL%=0:GOTO440 470 X%=(A%-1)MOD5 480 Y%=(A%-1)DIV5 490 X%=X%*5+2 500 Y%=Y%*2+1 510 PRINTTAB(V%,W%);CHR$(129) 520 PRINTTAB(X%,Y%);CHR$(135) 530 V%=X%:W%=Y% 540 FORD=1TO150:NEXT 550 NEXT 560 FORQ=1TO10 570 PRINTTAB(X%,Y%);CHR$(132) 580 FORD=1TO60:NEXT 590 PRINTTAB(X%,Y%);CHR$(131) 600 FORD=1TO60:NEXT 610 NEXT 620 PROClottery 630 V%=0:W%=22 640 PROCstore 650 NEXT 660 VDU7 670 PROCsort 680 PRINTTAB(0,22);CHR$(141)" Your numbers are:";CHR$(131);N$ 690 PRINTTAB(0,23);CHR$(141)" Your numbers are:";CHR$(131);N$ 700 PRINTTAB(0,24);"SPACE=new run; L=new lucky number "; 710 GOTO1490 720 "* 730 DEFPROCcheck 740 FORL=1TOB 750 IFA%=A(L) FL%=1 760 NEXT 770 ENDPROC 780 "* 790 DEFPROCstore 800 B=B+1 810 A(B)=A% 820 ENDPROC 830 "* 840 DEFPROCsort 850 FORN=1TO5 860 FORM=1TO5 870 IFA(M)>A(M+1) X=A(M):A(M)=A(M+1):A(M+1)=X 880 NEXT 890 NEXT 900 N$="" 910 FORN=1TO5 920 N$=N$+STR$(A(N))+"," 930 NEXT 940 N$=N$+STR$(A(6)) 950 ENDPROC 960 "* 970 DEFPROCgrid 980 VDU148,232,172,172,172,172,236,172,172,172,172,236,172,172,172,172,236,172,172,172,172,236,172,172,172,172,236 990 PRINT 1000 VDU148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234 1010 PRINT 1020 FORN=1TO9 1030 VDU148,234,172,172,172,172,238,172,172,172,172,238,172,172,172,172,238,172,172,172,172,238,172,172,172,172,238 1040 PRINT 1050 VDU148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234,160,160,160,148,234 1060 PRINT 1070 NEXT 1080 VDU148,170,172,172,172,172,174,172,172,172,172,174,172,172,172,172,174,172,172,172,172,174,172,172,172,172,174 1090 C=0 1100 FORM=1TO19STEP2 1110 FORN=2TO22STEP5 1120 C=C+1 1130 A$=STR$(C) 1140 IFLENA$=1 A$=" "+A$ 1150 PRINTTAB(N,M);CHR$(129);A$ 1160 NEXT:NEXT 1170 PRINTTAB(22,19)"" 1180 PROClottery 1190 ENDPROC 1200 "* 1210 DEFPROClottery 1220 FORH=1TO20 1230 P=RND(7):Q=RND(7) 1240 R=K(P):K(P)=K(Q):K(Q)=R 1250 PRINTTAB(30,0);CHR$(K(1))"||0" 1260 PRINTTAB(30,1);CHR$(K(1))" }||" 1270 PRINTTAB(30,2);CHR$(K(1))"||%" 1280 PRINTTAB(30,3);CHR$(K(2))"_||p|" 1290 PRINTTAB(30,4);CHR$(K(2))" j7" 1300 PRINTTAB(30,5);CHR$(K(2))"/////" 1310 PRINTTAB(30,6);CHR$(K(3))"| p |" 1320 PRINTTAB(30,7);CHR$(K(3))" " 1330 PRINTTAB(30,8);CHR$(K(3))"/////" 1340 PRINTTAB(30,9);CHR$(K(4))"|" 1350 PRINTTAB(30,10);CHR$(K(4))"||||" 1360 PRINTTAB(30,11);CHR$(K(4))"" 1370 PRINTTAB(30,12);CHR$(K(5))"|" 1380 PRINTTAB(30,13);CHR$(K(5))"||||" 1390 PRINTTAB(30,14);CHR$(K(5))"" 1400 PRINTTAB(30,15);CHR$(K(6))"_|||0" 1410 PRINTTAB(30,16);CHR$(K(6))" " 1420 PRINTTAB(30,17);:VDUK(6),34,47,47,47,33:PRINT 1430 PRINTTAB(30,18);CHR$(K(7))" |" 1440 PRINTTAB(30,19);CHR$(K(7))" " 1450 PRINTTAB(30,20);CHR$(K(7))"/////" 1460 NEXT 1470 ENDPROC 1480 "* 1490 PRINTTAB(0,21);:VDU129,157,131 1500 I=INKEY(0) 1510 IFI=32 CLS:GOTO350 1520 IFI=76 THEN200 1530 PRINTTAB(3,21)" `? `? `? `? `? `? `? `? `? `? ` " 1540 FORD=1TO250:NEXT 1550 PRINTTAB(3,21)"? `? `? `? `? `? `? `? `? `? `? " 1560 FORD=1TO250:NEXT 1570 PRINTTAB(3,21)"`? `? `? `? `? `? `? `? `? `? `? " 1580 FORD=1TO250:NEXT 1590 GOTO1500 1600 "* 1610 "NOTE: 1620 "Anyone who likes is welcome to use this program to raise money for good causes or for 8BS by setting it up and running in some public place - office, shop, pub - with a title screeninviting anyone to let the computer 1630 "choose their lottery numbers for them, at, say, 10p a go. The title screen might read, in double height, 'LET OUR FRIENDLY COMPUTER CHOOSE YOUR NATIONAL LOTTERY NUMBERS FOR YOU, FOR ONLY 10p FOR EACH SET OF SIX NUMBERS. 1640 "EVERY SET OF NUMBERS WILL BE DIFFERENT. THIS IS JUST FOR FUN, AND WILL NOT IMPROVE YOUR CHANCES OF WINNING. YOU WILL BE ABLE TO INCLUDE YOUR LUCKY NUMBER IN THE COMPUTER'S CALCULATIONS. PRESS THE SPACE BAR TO 1650 "START THE COMPUTER. THIS IS FOR THE BENEFIT OF ****.' 1660 "The next screen would be lucky number input, with instructions. The words in the bottom band of the final display screen would have to be removed, and that display would have to revert back automatically to the 1670 "title screen after, say, one minute. Don't use TIME for this timing as it is used for randomising the lottery numbers.