求写vb代码:在多个指定范围内随机数字


求写vb代码:在多个指定范围内随机数字
m N as integer,I as integer,R as string,T as integer,FilPath as string
FilPath=Environ("userprofile")+ "\桌面\suiji.txt"
open FilPath for output as #1
for I=1 to N 'N是指定长度
randomize
T=int(rnd()*4)
select case T
case 1
randomize
R=R+Chr(int(rnd()*25)+65)'生成一个大写字母
case 2
randomize
R=R+Chr(int(rnd()*25)+97)'悔姿生成一迹磨个小写字母
case 3
randomize
R=R+Chr(int(rnd()*9)+48)'生成碧州绝一个数字
end select
next I
print #1,R
close #1

百年天地回元气 一统山河际太平 国泰民安