首页 > 编程 > ASP > 正文

福利彩票生成程序ASP版

2024-05-04 11:07:26
字体:
来源:转载
供稿:网友
<%
sub shuaxin()

dim  outRed , outBlue , blueBall ,redBall(8) ,a , I

Randomize
a=32
I=13

blueBall =int(I*rnd()+1)

for i=1 to 7

      tmp =  int(a*rnd()+1)

      isSame=false

      for j=1 to i-1
            if  redBall[j]=tmp then isSame=true
      next

      if  isSame=false then 
          redBall[i] = tmp
      else
          i = i - 1
      end if
next

outBlue = "蓝球:" &  blueBall
outRed = "红球:"

for i = 1 to 7
      outRed = outRed &  redBall  & " , "
next
 
      response.write  outRed & outBlue

end sub
%>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表