在文本框输入多个用,分隔的整数,按回车键后将各数据按降序输出到窗体,请问我的程序哪里出错了?
答案:2 悬赏:30 手机版
解决时间 2021-02-06 17:17
- 提问者网友:送舟行
- 2021-02-05 18:21
b(i) = b(p): b(p) = t
Next
For i = n To m
Print b(i);
Next
End If
End Sub
PS, p, n: m = UBound(a)
ReDim b%(n To m)
For i = n To m
b(i) = Val(a(i))
Next i
For i = n To m - 1
p = i
For j = i + 1 To m
If b(p) < b(j) Then p = j
Next
t = b(i);,")
n = LBound(a).Text, ", m, t%
Dim b%(), a$()
a = Split(Text1Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim i, j:1
最佳答案
- 五星知识达人网友:第幾種人
- 2021-02-05 19:05
p, n: m = UBound(a)
ReDim b%(n To m)
For i = n To m
b(i) = Val(a(i))
Next i
For i = n To m
For j = n To i
If b(i) >,")
n = LBound(a).Text, ", m, t%
Dim b%(), a$()
a = Split(Text1Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim i, j; b(j) Then t = b(i)
ReDim b%(n To m)
For i = n To m
b(i) = Val(a(i))
Next i
For i = n To m
For j = n To i
If b(i) >,")
n = LBound(a).Text, ", m, t%
Dim b%(), a$()
a = Split(Text1Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim i, j; b(j) Then t = b(i)
全部回答
- 1楼网友:孤老序
- 2021-02-05 19:44
","改成半角的
字符可以直接比较大小 就是按ascii码比较的 用冒泡法什么的排序就行了
把N在通用声明
for i=0 to ubound(n())
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯