[求助]随机生存7个数
今天学习了随机生存rnd ,就想到彩票的随机生存.不知道怎么前6个数会有小数,而不是整数,还有怎么把0去掉
Private Sub Command1_Click()
Dim a, b, c, d, e, f, g As Integer
a = int((33*Rnd)+1)
b =int((33*Rnd)+1)
c = int((33*Rnd)+1)
d = int((33*Rnd)+1)
e = int((33*Rnd)+1)
f = int((33*Rnd)+1)
g = int((16*rnd)+1)
Text1.Text = a
Text2.Text = b
Text3.Text = c
Text4.Text = d
Text5.Text = e
Text6.Text = f
Text7.Text = g
End Sub
[此贴子已经被作者于2007-7-8 20:36:16编辑过]