Re: [請益] 請問關於do loop

看板Visual_Basic作者 (小獅)時間19年前 (2005/05/29 07:20), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串5/5 (看更多)
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

203.67.56.83 05/29, , 1F
感謝^^
203.67.56.83 05/29, 1F
文章代碼(AID): #12cFoduQ (Visual_Basic)
文章代碼(AID): #12cFoduQ (Visual_Basic)