Lotto

See all articles from The Plotter v9 n9
Author(s): Bob Evans
Publication: The Plotter
Pub Details: The Plotter v9 n9 (Volume 9, Issue 9)
Date: September 1991
Pages: 5

Here is a program for picking lottery numbers. Line 120 can be changed to reflect the amount of numbers they are drawing from. Line 155 is to tell me whether I am using MEGA BUCKS or LOTTO AMERICA. I make a program for each.

   1 BORDER 4: PAPER 0: CLS : PAPER 1: INK 6
2 FOR x=0 TO 31 STEP 2
3 PRINT FLASH 1;AT 0,x;CHR$ 143;CHR$ 128;AT 21,30-x;CHR$ 128;CHR$ 143
4 IF x<22 THEN PRINT FLASH 1;AT x,0;CHR$ 143;AT x+1,0;CHR$ 128;AT 20-x,31;CHR$ 128;AT 20-x+1,31;CHR$ 143
5 NEXT x
10 RANDOMIZE : PAPER 0: INK 7
20 INPUT "How many lines (1-10)? ";q: IF q>10 THEN GO TO 20
30 FOR g=1 TO q
40 DIM s(44)
50 FOR n=1 TO 6
60 LET a=1+INT (RND*44)
70 IF NOT s(a) THEN LET s(a)=a: GO TO 90
80 GO TO 60
90 NEXT n
100 PRINT AT g*2,5;"(";g;") ";
110 LET c=0
120 FOR n=1 TO 44
130 IF s(n) THEN LET c=c+1: PRINT s(n);"," AND c<6;
140 NEXT n
150 BEEP .01,20: PRINT ''
155 PRINT AT 1,11;"[illegible]"
160 NEXT g: PRINT #1;AT 1,10;"Good luck!!"
170 PAUSE 0: GO TO 1: STOP
9999 RANDOMIZE USR 100: SAVE "mega.B1" LINE 1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.