注册 登录
编程论坛 VB6论坛

小虾请求指教,哪里出错

语成峰 发布于 2013-04-18 15:39, 414 次点击
Private Sub Command1_Click()
Dim a, b, c(7), i%, j%
a = Array(1, 3, 5, 2, 4, 18, 50, 25)
b = Array(5, 27, 30, 35, 60, 41, 87, 33)
For i = 0 To 7
  c(i) = a(i) + b(i)
Next
Print "第一个数组为:"
Print Join(a, ", ")
Print "第二个数组为:"
Print Join(b, ", ")
Print "两个数组相对元素相加的结果为:"
Print Join(c, ", ")
Print "相加的结果的降序为:"
 For j = i + 1 To 7
  If c(i) <= c(j) Then
  temp = c(i)
  c(i) = c(j)
  c(j) = temp
  Print Join(c, ",")
  Next

End Sub
1 回复
#2
风吹过b2013-04-18 17:35
重复发贴,沉底。
1