![]() |
#2
flynet2007-09-24 11:27
我已经 弄出来了 现给大家 发布出来吧呵呵也许谁用的着呢 %> 'Create and define array 'Initiate randomize method for default seeding randomize 'Loop through and create the output based on the the variable passed to 'Set return 'for h=1 to 1000 [此贴子已经被作者于2007-9-24 11:28:21编辑过] |
以下是我写的生成卡号的程序 现在是要加上 生成卡号时也给配上一个随机的密码 请问谁能给我讲讲有什么好办法给配上随机密码, 怎样实现生成随机密码 然后配给生成的卡号 就是生成一个卡号的同时 也生成了一个随机密码 还有就是生成随机密码的程序 能不能给写上来。。。
i=1 '年级号01
j=1 '课程号01
k=1 '卡的顺序00001
a=30 '月卡记号30
ss="" '卡号01010000130
for i=1 to 9 '年级循环
ss="0"&i
aa=ss '返回i循环前将前2位缓存
'//初二i=8和初三i=9是5门课
if i>7 then
v=5
else
v=3
end if
for j=1 to v '课程号循环
ss=ss&"0"&j
dd=ss '返回j循环前将前4位缓存
for k=1 to 10000 '卡顺序循环10000张
'判断位数
if len(k)=1 then
kk="0000"&k
elseif len(k)=2 then
kk="000"&k
elseif len(k)=3 then
kk="00"&k
elseif len(k)=4 then
kk="0"&k
else
kk=k
end if
ss=ss&kk
'添加标记
ss=ss&"30"
response.write(ss&"<br>")
ss=dd '返回j循环后添加前4位数字
response.write(i&"年级"&j&"课程的第"&k&"张卡<br>")
next
ss=aa '返回i循环后添加前2位数字
next
next