33选6

作者在 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
VFP程序 | 阅读 2971 次
文章评论,共0条
游客请输入验证码
浏览118801次