作者在 2006-09-25 06:47:00 发布以下内容
***
***C33选6 (C)Copyright 2006-2006 Tiger5392
***
SET TALK OFF
DIMENSION acCaipiao(6)
PRIVATE acCaipiao,cText,nCnt,lOk,J
acCaipiao=[00]
cText=[]
nCnt=1
DO WHILE nCnt<=6
nRand=PADL(INT(RAND()*33+1),2,"0")
lOk=.T.
FOR J=1 TO nCnt
IF acCaipiao(J)=nRand
lOk=.F.
EXIT
ENDIF
ENDFOR
IF lOk
acCaipiao(nCnt)=nRand
nCnt=nCnt+1
ENDIF
ENDDO
ASORT(acCaipiao)
FOR nCnt=1 TO 6
cText=cText+acCaipiao(nCnt)+IIF(nCnt<6,[,],[])
ENDFOR
RETURN cText
***C33选6 (C)Copyright 2006-2006 Tiger5392
***
SET TALK OFF
DIMENSION acCaipiao(6)
PRIVATE acCaipiao,cText,nCnt,lOk,J
acCaipiao=[00]
cText=[]
nCnt=1
DO WHILE nCnt<=6
nRand=PADL(INT(RAND()*33+1),2,"0")
lOk=.T.
FOR J=1 TO nCnt
IF acCaipiao(J)=nRand
lOk=.F.
EXIT
ENDIF
ENDFOR
IF lOk
acCaipiao(nCnt)=nRand
nCnt=nCnt+1
ENDIF
ENDDO
ASORT(acCaipiao)
FOR nCnt=1 TO 6
cText=cText+acCaipiao(nCnt)+IIF(nCnt<6,[,],[])
ENDFOR
RETURN cText