首页上一页 1 下一页尾页 1 条记录 1/1页
vb排序
发表在VB答疑区
2010-10-13
是否精华
是
否
版块置顶:
是
否
Option Base 1
Private Sub Form_Click()
dim a(10) As Long
Dim i As Long, j As Long, n As Long
a1 = 72: a2 = 57: a3 = 65: a4 = 76: a5 = 68: a6 = 83: a7 = 70: a8 = 66: a9 = 85: a10 = 62
For i = 1 To 10
For j = i + 1 To 10
If a(i) > a(j) Then
n = a(i)
a(i) = a(j)
a(j) = n
End If
Next j
Print a(i);
Next i
End Sub
这个代码怎么不行啊
Private Sub Form_Click()
dim a(10) As Long
Dim i As Long, j As Long, n As Long
a1 = 72: a2 = 57: a3 = 65: a4 = 76: a5 = 68: a6 = 83: a7 = 70: a8 = 66: a9 = 85: a10 = 62
For i = 1 To 10
For j = i + 1 To 10
If a(i) > a(j) Then
n = a(i)
a(i) = a(j)
a(j) = n
End If
Next j
Print a(i);
Next i
End Sub
这个代码怎么不行啊