, VB 2005, . . , , .
:
Code:
Private Sub  ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem.Click
        Dim h, i, j, x1 As Integer
        h = 0
        While (2 * (3 * h + 1) <= 10)
            h = 3 * h + 1
            While (h > 0)
                For i = h To 10
                    x1 = mas(i)
                    For j = i - h To 0
                        If (x1 < mas(j)) Then
                            mas(j + h) = mas(i)
                        Else
                            Exit Sub
                        End If
                    Next j
                    mas(j + h) = x1
                Next i
            End While
            h = h / 3
        End While
        Label22.Text = mas(1)
        Label21.Text = mas(2)
        Label20.Text = mas(3)
        Label19.Text = mas(4)
        Label18.Text = mas(5)
        Label17.Text = mas(6)
        Label16.Text = mas(7)
        Label15.Text = mas(8)
        Label14.Text = mas(9)
        Label13.Text = mas(10)
        Label23.Text = "    "
    End Sub
Label13-Label22.
?