大侠帮帮忙啊
Private Sub Command1_Click()Dim i As Integer, j As Integer, a() As Double, n As Integer, x() As Double, sum As Double
ReDim Preserve a(1 To n, 1 To n + 1) As Double, x(1 To n) As Double
sum = 0
x(n) = a(n, n + 1) / a(n, n)
For i = (n - 1) To 1 Step -1
For j = (i + 1) To n Step 1
sum = sum + a(i, j) * x(j)
Next j
x(i) = (a(i, n + 1) - sum) / a(i, i)
Next i
End Sub
a()和x()已经定义成公共变量了
这段程序怎么有问题啊!调试的时候讲是小标超界,这到底是怎么回事啊?