Private Sub Command1_Click()
Dim str() As String
Dim num() As Integer
Dim max, i, n, j ,r As Integer
str() = Split(Text1.Text, ",")
n = UBound(str)
ReDim num(n)
For i = 0 To n
num(i) = CInt(str(i))
Next i
For r = 0 To n - 1
For j = i To n
If num(i) > num(j) Then
max = num(i)
num(i) = num(j)
num(j) = max
Else
End If
Next j
Next r
For r = 1 To n
Print num(r)
Next r
End Sub
帮忙---哪里错了
答案:1 悬赏:0 手机版
解决时间 2021-07-16 21:19
- 提问者网友:嘚啵嘚啵
- 2021-07-16 14:40
最佳答案
- 五星知识达人网友:掌灯师
- 2021-07-16 15:17
Private Sub Command1_Click()
Dim str() As String
Dim num() As Integer
Dim max, i, n, j ,r As Integer
str() = Split(Text1.Text, ",")
n = UBound(str)
ReDim num(n)
For i = 0 To n
num(i) = CInt(str(i))
Next i
For i= 0 To n - 1
For j = i To n
If num(i) > num(j) Then
max = num(i)
num(i) = num(j)
num(j) = max
Else
End If
Next j
Next i
For r = 0 To n
Print num(r)
Next r
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯