怎么让vb文本框中随机输出的多个数字不相等,并按大小排序。拜托各位大神
1个回答
展开全部
Private Sub Command1_Click() Text1.Text = "" Dim a(1 To 10) For i = 1 To 10 a(i) = Int(Rnd * 20 + 1) For j = 1 To i - 1 If a(i) = a(j) Then i = i - 1: Exit For Next j Next i For i = 1 To 10 Text1.Text = Text1.Text & Str(a(i)) Next i '...... End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询