Private Sub Command1_Click()
Dim a(1 To 100) As Integer
x = Val(Text1.Text)
y = Val(Text2.Text)
For i = 1 To 100
(1)
List1.AddItem Str(a(i))
Next i
For i = x To y - 1
k = i
For (2)
If a(k) > a(j) Then k = j
Next j
If k <> i Then
t = a(k): a(k) = a(i): a(i) = t
End If
Next i
For i = x To y
List2.AddItem Str(a(i))
Next i
End Sub
⑴ ⑵