Private Sub Command1_Click()
Dim mat(3, 3) As Integer '定义3行3列的数组
Dim i As Integer, j As Integer
'对数组赋值
'由于我没有学过行列式转阵,所以,我不知道这些数组值有什么规则可言
'又或者,没有规则,我不清楚,所以只好用你给我的数去求.
mat(0, 0) = 1: mat(0, 1) = 2: mat(0, 2) = 3
mat(1, 0) = 1: mat(1, 1) = 1: mat(1, 2) = 1
mat(2, 0) = 1: mat(2, 1) = 3: mat(2, 2) = 4
For i = 0 To 2
mat(1, i) = mat(1, i) - mat(0, i) '第二行减第一行
Next
For i = 0 To 2
mat(2, i) = mat(2, i) - mat(0, i) '第三行减第一行
Next
For i = 0 To 2
mat(2, i) = mat(2, i) - mat(1, i) * -1 '第三行减第二行的-1倍
Next
For i = 0 To 2 '输出
For j = 0 To 2
Print mat(i, j);
Next
Print
Next
End Sub