Establish a team table, and the fields include team number, team name, lottery number (numerical type), game number (numerical type), etc.
Generate a random number and write it into the lottery number:
Size ss( 16)
a=val(right(time(),2))
Rand (1)
For i= 1 to 16.
s=int(rand()* 10+ 1)
ss(i)=s
end
Use team tables
i= 1
scan
Replay the lottery number with ss(i)
i=i+ 1
End scan
* Index lottery numbers to generate matching numbers.
Lottery number label lottery number index
i= 1
J= 1
scan
If i= 1
Reschedule the session number with j
i=i+ 1
other
Reschedule the session number with j
J=J+ 1
i= 1
endif
End scan