[求助]在线急等到天明
问题:将5个数加减乘除,将得到的结果按大小排列!我的解决办法:用嵌套循环,代码大略如下:
Dim i(4) As Integer '代表输入的5个数
Dim a(3) As String
Dim b(3) As String
Dim c(3) As String
Dim d(3) As String
a(0) = b(0) = c(0) = d(0) = "+" ' 这4句出错
a(1) = b(1) = c(1) = d(1) = "-"
a(2) = b(2) = c(2) = d(2) = "*"
a(3) = b(3) = c(3) = d(3) = "/"
Private Sub JS()
For h = 0 To 119
For j = 0 To 3
For k = 0 To 3
For l = 0 To 3
For n = 0 To 3
Sum(h) = i(0) & a(j) & i(1) & b(k) & i(2) & c(l) & i(3) & d(n) & i(4)
Next n
Next l
Next k
Next j
Next h
End Sub
求各位大大给点提示啊!感谢!