VB 递减次序排列

2024年11月16日 10:33
有2个网友回答
网友(1):

Dim n As Integer
Dim aaa(100) As String
Private Sub Command1_Click()
For i = 1 To n - 1
For j = i To n
If aaa(i) < aaa(j) Then
temp = aaa(i)
aaa(i) = aaa(j)
aaa(j) = temp
End If
Next j
Next i
Picture1.Cls
For i = 1 To n
Picture1.Print aaa(i)
Next i
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Picture1.Print Text1.Text
n = n + 1
aaa(n) = Text1.Text
Text1.Text = ""
End If
End Sub

网友(2):

兄弟,不要以为众人的脑力劳动不值钱,你竟然抠门的一分都不出?