转置矩阵问题(续)
Dim a(1 To 8, 1 To 8) As Integer, b(1 To 8, 1 To 8) As IntegerPrivate Sub Command1_Click()
For i = 1 To 8
For j = 1 To 8
b(j, i) = GetArray(i, j)
Next
Next
Picture1.CurrentY = 80
For i = 1 To 8
For j = 1 To 8
Picture1.Print Format(b(i, j), "@@@");
Next
Picture1.Print
Picture1.Print
Next
End Sub
Private Sub Command2_Click()
Picture1.Cls
Form_Activate
End Sub
Private Sub Form_Activate()
Form_Load
End Sub
Private Sub Form_Load()
Randomize
For i = 1 To 8
For j = 1 To 8
a(i, j) = Int(Rnd * 90) + 10
Next
Next
Picture1.CurrentY = 80
For i = 1 To 8
For j = 1 To 8
Picture1.Print Format(a(i, j), "@@@");
Next
Picture1.Print
Picture1.Print
Next
End Sub
Function GetArray(i As Integer, j As Integer) As Integer
GetArray = a(i, j)
End Function
原帖地址:https://bbs.bccn.net/thread-209316-1-1.html
还是报错,麻烦再帮我看一下哦!!!
[[it] 本帖最后由 xiaolaba3330 于 2008-4-16 12:54 编辑 [/it]]