8-Bit Software Online Conversion

Lottery. Select Numbers - Listing

10REM" LOTTERY 20REM J.Davis '94. 30REM"An anagram of National Lottery is Totally Inane Rot. 40MODE7 50DIMA(6) 60DIMK(7) 70VDU23,1,0;0;0;0; 80LKN=1 90PRINTTAB(14)"  )"  100PRINTCHR$(145);STRING$(39,"s") 110PRINT" If you plan to have a go at the National Lottery and you would like your Beeb to choose your numbers for you, this program will make your life a little easier. Unfortu nately, it won't improve the odds..." 120PRINT" If you should happen to w in zillions using this program, I claim 10%. If you don't win anything, I di sclaim all responsibility for everythi ng from the Big Bang to the end of time. Just blame your computer, "; 130PRINT"or sunspots, or your budgie ." 140PRINTCHR$(145);STRING$(39,","); 150PRINT" If you would like to include your lucky number in the randomising fa ctor, press 'L', or press SPACE to run." 160PRINTCHR$(145);STRING$(39,","); 170PRINT" Also see note at end of list ing." 180PRINTCHR$(145);STRING$(39,"s"); 190G$=GET$:IFG$<>"L" CLS:GOTO250 200MODE7 210PRINTTAB(1,4)" PLEASE ENTER YOUR LUCKY NUMBER " 220PRINTTAB(1,6)" * * * * * * " 230PRINTTAB(18,6); 240INPUT""LKN 250VDU23,1,0;0;0;0; 260X=129:Y=135 270FORN=1TO20 280PRINTTAB(8,11);CHR$(141);CHR$(X);CH R$(157);CHR$(Y)"* GOOD LUCK * " 290Z=X:X=Y:Y=Z 300FORD=1TO100:NEXT 310PRINTTAB(8,12);CHR$(141);CHR$(X);CH R$(157);CHR$(Y)"* GOOD LUCK * " 320FORD=1TO100:NEXT 330NEXT 340CLS 350T=ABS(TIME*LKN) 360IFT=0 OR T>2E9 T=ABS(TIME) 370Z=RND(-T) 380B=0:FL%=0 390V%=0:W%=22 400FORN=1TO7:K(N)=144+N:NEXT 410PROCgrid 420FORN=1TO6 430FORM=1TO20+RND(20) 440A%=RND(49) 450PROCcheck 460IFFL%=1 FL%=0:GOTO440 470X%=(A%-1)MOD5 480Y%=(A%-1)DIV5 490X%=X%*5+2 500Y%=Y%*2+1 510PRINTTAB(V%,W%);CHR$(129) 520PRINTTAB(X%,Y%);CHR$(135) 530V%=X%:W%=Y% 540FORD=1TO150:NEXT 550NEXT 560FORQ=1TO10 570PRINTTAB(X%,Y%);CHR$(132) 580FORD=1TO60:NEXT 590PRINTTAB(X%,Y%);CHR$(131) 600FORD=1TO60:NEXT 610NEXT 620PROClottery 630V%=0:W%=22 640PROCstore 650NEXT 660VDU7 670PROCsort 680PRINTTAB(0,22);CHR$(141)" Your numb ers are:";CHR$(131);N$ 690PRINTTAB(0,23);CHR$(141)" Your numb ers are:";CHR$(131);N$ 700PRINTTAB(0,24);" SPACE=new run; L =new lucky number "; 710GOTO1490 720" * 730DEFPROCcheck 740FORL=1TOB 750IFA%=A(L) FL%=1 760NEXT 770ENDPROC 780" * 790DEFPROCstore 800B=B+1 810A(B)=A% 820ENDPROC 830" * 840DEFPROCsort 850FORN=1TO5 860FORM=1TO5 870IFA(M)>A(M+1) X=A(M):A(M)=A(M+1):A( M+1)=X 880NEXT 890NEXT 900N$="" 910FORN=1TO5 920N$=N$+STR$(A(N))+"," 930NEXT 940N$=N$+STR$(A(6)) 950ENDPROC 960" * 970DEFPROCgrid 980VDU148,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 990PRINT 1000VDU148,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 1010PRINT 1020FORN=1TO9 1030VDU148,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 1040PRINT 1050VDU148,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 1060PRINT 1070NEXT 1080VDU148,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 1090C=0 1100FORM=1TO19STEP2 1110FORN=2TO22STEP5 1120C=C+1 1130A$=STR$(C) 1140IFLENA$=1 A$=" "+A$ 1150PRINTTAB(N,M);CHR$(129);A$ 1160NEXT:NEXT 1170PRINTTAB(22,19)" " 1180PROClottery 1190ENDPROC 1200" * 1210DEFPROClottery 1220FORH=1TO20 1230P=RND(7):Q=RND(7) 1240R=K(P):K(P)=K(Q):K(Q)=R 1250PRINTTAB(30,0);CHR$(K(1))"||0" 1260PRINTTAB(30,1);CHR$(K(1))" ¾||" 1270PRINTTAB(30,2);CHR$(K(1))"||%" 1280PRINTTAB(30,3);CHR$(K(2))"`||p|" 1290PRINTTAB(30,4);CHR$(K(2))" j7" 1300PRINTTAB(30,5);CHR$(K(2))"/////" 1310PRINTTAB(30,6);CHR$(K(3))"| p |" 1320PRINTTAB(30,7);CHR$(K(3))"  " 1330PRINTTAB(30,8);CHR$(K(3))"/////" 1340PRINTTAB(30,9);CHR$(K(4))"|" 1350PRINTTAB(30,10);CHR$(K(4))"||||" 1360PRINTTAB(30,11);CHR$(K(4))"" 1370PRINTTAB(30,12);CHR$(K(5))"|" 1380PRINTTAB(30,13);CHR$(K(5))"||||" 1390PRINTTAB(30,14);CHR$(K(5))"" 1400PRINTTAB(30,15);CHR$(K(6))"`|||0" 1410PRINTTAB(30,16);CHR$(K(6))" " 1420PRINTTAB(30,17);:VDUK(6),34,47,47,4 7,33:PRINT 1430PRINTTAB(30,18);CHR$(K(7))" |" 1440PRINTTAB(30,19);CHR$(K(7))" " 1450PRINTTAB(30,20);CHR$(K(7))"/////" 1460NEXT 1470ENDPROC 1480" * 1490PRINTTAB(0,21);:VDU129,157,131 1500I=INKEY(0) 1510IFI=32 CLS:GOTO350 1520IFI=76 THEN200 1530PRINTTAB(3,21)" £? £? £? £? £? £? £ ? £? £? £? £ " 1540FORD=1TO250:NEXT 1550PRINTTAB(3,21)"? £? £? £? £? £? £? £? £? £? £? " 1560FORD=1TO250:NEXT 1570PRINTTAB(3,21)"£? £? £? £? £? £? £? £? £? £? £? " 1580FORD=1TO250:NEXT 1590GOTO1500 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 screen inviting 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.