十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Dim n As Integer, b As Integer, a(13) As Integer
超过十载行业经验,技术领先,服务至上的经营模式,全靠网络和口碑获得客户,为自己降低成本,也就是为客户降低成本。到目前业务范围包括了:成都网站建设、成都网站设计,成都网站推广,成都网站优化,整体网络托管,小程序制作,微信开发,重庆APP开发,同时也可以让客户的网站和网络营销和我们一样获得订单和生意!
Private Sub Command1_Click()
If b 5 Then
b = b + 1
x = Int(n * Rnd()) + 1
Text1.Text = Text1.Text a(x) " "
a(x) = a(n)
n = n - 1
Else
Call Form_Load
End If
End Sub
Private Sub Form_Load()
Randomize
n = 13: b = 0
For i = 1 To 13
a(i) = i
Next i
Text1.Text = ""
End Sub
想要生成多少个都行。
Randomize()随机打乱
dim a1 as integer=cint(rnd()*32))+1
dim a2 as integer=cint(rnd()*32))+1
dim a3 as integer=cint(rnd()*32))+1
dim a4 as integer=cint(rnd()*32))+1
dim a5 as integer=cint(rnd()*32))+1
Private Sub Command1_Click()
Dim num(6) As Integer
Dim i As Integer, j As Integer
Dim tmp As Integer
Randomize '防止每次生出随机数一样
For i = 0 To 5
num(i) = Int(Rnd * 53) + 1
Next
PrintNum "新生成的6个随机数为:", num()
For i = 0 To 5
For j = 0 To 5
If num(j) num(j + 1) Then
tmp = num(j)
num(j) = num(j + 1)
num(j + 1) = tmp
End If
Next
Next
PrintNum "排序后的6个随机数为:", num()
End Sub