馬上註冊  |  找回密碼

SAY討論區

查看: 294|回復: 0
打印 上一主題 下一主題

How can we use ascending order for this? [複製鏈接]

好友
0
帖子
124731
積分
124889
最後登錄
2019-2-28
在線時間
0 小時
跳轉到指定樓層
樓主
發表於 2012-5-12 02:25:41 |只看該作者 |倒序瀏覽
<div class="blockcode"><span class="headactions" onclick="copycode($('code0'));">複製內容到剪貼板</span><h5>代碼:</h5><code id="code0">Public Class Form1

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim number As Integer
  Dim n As Integer
  Dim M6(49) As Integer
  Dim repeated As Boolean

  For x = 0 To 5
    Do
      repeated = False
      number = 49 * Rnd()

      For intindex = 0 To 5
      If number = intarray(n) Then
        repeated = True
      End If
      Next
    Loop Until repeated = False

    intarray(x) = number

  Next

  TextBox1.Text = M6(0)
  TextBox2.Text = M6(1)
  TextBox3.Text = M6(2)
  TextBox4.Text = M6(3)
  TextBox5.Text = M6(4)
  TextBox6.Text = M6(5)
  End Sub

End Class</code>
分享分享0 收藏收藏0 讚好讚好0 Unlike!Unlike!0 分享 傳送 邀請
您需要登錄後才可以回帖 登錄 | 馬上註冊 |

Archiver|手機版|SAY討論區

GMT+8, 2026-5-26 23:09 , Processed in 1.932534 second(s), 8 queries .

Powered by go2tutor.comDiscuz! X2

© 2026 Community Networks Limited

回頂部