作者fumizuki (小狮)
看板Visual_Basic
标题Re: [请益] 请问关於do loop
时间Sun May 29 07:24:38 2005
Private Sub Command1_Click()
Dim r(3) As Integer, i As Integer, j As Integer, Exists As Boolean
Randomize
For i = 0 To 3
Exists = True
Do While Exists
Exists = False: r(i) = Fix(Rnd * 10)
For j = 0 To i - 1
If r(i) = r(j) Then Exists = True
Next
Loop
Print r(i)
Next
End Sub
--
VB 程式设计 仓木麻衣 PTT 星爷板 行列输入法
======================================================
Visual_Basic MaiKuraki Stephen Array
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.58.156.43
1F:推 smaljohn:感谢^^ 203.67.56.83 05/29