10REM" ALL LOTTERY COMBINATIONS      
   20REM"(13,983,816 - NINE DAYS)
   30REM"John Davis -'98.
   40REM"========================
   50REM *TV255,1
   60MODE7
   70ONERRORVDU26:END
   80VDU23,1,0;0;0;0;
   90PRINT
  100PRINT"Our computer has decided
- againstour better judgement - that,
 as a kind"
  110PRINT"of perverse public service,
it wants todisplayALLthe possible com
binationsof National Lottery numbers.
"
  120PRINT"    Well, here they are..."
  130PRINTTAB(0,7)CHR$(145)STRING$(39,"|
");
  140FORN=8TO16
  150  PRINTTAB(0,N)CHR$(145)CHR$(255)
  160  PRINTTAB(31,N)CHR$(145)CHR$(255)
  170  PRINTTAB(38,N)CHR$(145)CHR$(255);
 
  180NEXT
  190PRINTTAB(0,17)CHR$(145)STRING$(39,"
/");
  200PRINTTAB(33,9)" TIME"
  210PRINTTAB(33,10)"Days"
  220PRINTTAB(33,11)"0"
  230PRINTTAB(33,12)"Hrs"
  240PRINTTAB(33,13)"0"
  250PRINTTAB(33,14)"Mins"
  260PRINTTAB(33,15)"0"
  270PRINTTAB(0,18)"This will take a
bout 9 days, running";
  280PRINT"24 hours a day. It started a
t 5pm onSaturday, Jan.17, and should
 finish -if";
  290PRINT"nobody bashes the plug - som
etime nextMonday, Jan.26."
  300PRINT"(To win the lottery, all
you have todo is pick the right one...)
";
  310VDU28,2,16,30,9
  320C%=0:TIME=0
  330 FORM%=1TO44
  340   FORN%=M%+1TO45
  350     FORO%=N%+1TO46
  360       FORP%=O%+1TO47
  370         FORQ%=P%+1TO48
  380           FORR%=Q%+1TO49
  390             C%=C%+1
  400             PRINTTAB(0,7);""C%"
"M%" "N%" "O%" "P%" "Q%" "R%
  410         NEXT:NEXT
  420        MIN%=INT(TIME/6000)
  430        HR%=INT(MIN%/60)
  440        MIN%=MIN%-HR%*60
  450        DAY%=INT(HR%/24)
  460        HR%=HR%-DAY%*24
  470        VDU26
  480        PRINTTAB(33,11)"";DAY%
  490        PRINTTAB(33,13)"";HR%;" "
  500        PRINTTAB(33,15)"";MIN%;" "
 
  510        VDU28,2,16,30,9
  520 NEXT:NEXT:NEXT:NEXT
  530VDU7:VDU7:VDU7
  540VDU26
  550PRINTTAB(2,16)" WHEW! Finished."
  560GOTO560