两个4X4矩阵相乘,得到另一个矩阵,并将其输出,我这错了,可是不会改
Private Sub Form_Click()Dim a(4, 4) As Integer, b(4, 4) As Integer, c(4, 4) As Integer, i%, j%
Print "A矩阵为"
For i = 1 To 4
For j = 1 To 4
a(i, j) = Int(Rnd * 30) + 10
b(i, j) = Int(Rnd * 30) + 10
Print a(i, j);
Next j
Next i
Print "B矩阵为"
For i = 1 To 4
For j = 1 To 4
b(i, j) = Int(Rnd * 30) + 10
Print b(i, j);
Next j
Next i
Print "C矩阵为"
For i = 1 To 4
For j = 1 To 4
c(i, j) = c(i, j) + a(i, j) * b(j, i)
Print c(i, j);
Next j
Next i
End Sub