10 REM Pgm. name:MODLOT3
20 MODE7
30 VDU23,1,0;0;0;0;
40 DIM A(49)
50 count=0
60 CLS
70 PRINT TAB(2,22)CHR$130;"Total numb
er of random";TAB(2,23)CHR$130;"numbers
generated:";CHR$135
80 PRINT TAB(0,1)CHR$130;"Press";CHR$
135;"SHIFT-CTRL";CHR$130;"for a temporar
y stop.";TAB(0,2)CHR$130;"Press";CHR$135
;"S";CHR$130;"for a permanent stop."
90 FOR N=1 TO 49:PROCgetxandy:PRINT T
AB(x,y)CHR$130;FNpad(N);CHR$135:NEXT N
100 REPEAT
110 N=RND(49):A(N)=A(N)+1:PROCgetxandy
:PRINT TAB(x+4,y)FNpAd(A(N)):count=count
+1:PRINT TAB(22,23);count
120 UNTIL INKEY$(1)="S"
130 VDU23,1,1;0;0;0;
140 END
150 REM```````````````````````````````
``````````````````````````````````````
160 DEFPROCgetxandy
170 IF N<18 THEN x=0:y=N+3
180 IF N>17 AND N<35 THEN x=13:y=N-14
190 IF N>34 THEN x=26:y=N-31
200 ENDPROC
210 REM```````````````````````````````
`````````````````````````````````````
220 DEFFNpad(Q)
230 IF LEN(STR$(Q))=2 THEN =STR$(Q) EL
SE =" "+STR$(Q)
240 REM```````````````````````````````
`````````````````````````````````````
250 DEFFNpAd(Q)=STRING$(8-LEN(STR$(Q))
,".")+STR$(Q)