close

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim num() As Integer = {3, 2, 6, 8, 5, 7, 0, 1, 9, 4}
        Dim temp As Integer
        For i As Integer = 0 To 9
            For j As Integer = i To 9
                If (num(i) > num(j)) Then
                    temp = num(i)
                    num(i) = num(j)
                    num(j) = temp
                End If
            Next
        Next
        For Each n As Integer In num
            Response.Write(n & ", ")
        Next
    End Sub
End Class



arrow
arrow
    全站熱搜
    創作者介紹
    創作者 arthurliu 的頭像
    arthurliu

    arthurliu's blog

    arthurliu 發表在 痞客邦 留言(0) 人氣()