高校等考试题天天练二级VB]10月24日
知识点:程序填空(一) 本事件过程对给定的矩阵进行转置,转置前后的矩阵分别如下面左、右两图所示。 1 2 3 1 4 7 4 5 6 2 5 8 7 8 9 3 6 9 Private Sub Command1_Click() Dim a(3, 3) As Integer,k As Integer k=0 For m = 1 To 3 For n = 1 To 3 k = (1) :a(m, n) = k Next n Next m For m = 1 To 3 For n = 1 To (2) t = a(m, n): a(m, n) = a(n, m): a(n, m) = t Next n Next m For m = 1 To 3 For n = 1 To 3 Print a(m, n); Next n (3) Next m End Sub 相关资料 |