题目内容:
已知数组A(4,4),各个元素在运行程序时被赋值并打印,形成四除非方阵。请在______和______处填写所需的内容,使其产生一个转置矩阵(即行列互换),仍放在数组A中,并打印出来。例如: 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 Private Sub Command1_Click() Dim s(4,4) For k=1 To 4 For j=1 To 4 a(k,j) =j Print a(k,j); Next Print Next For k=2 To 4 For j=1 To t=a(j,k) a(j,k)= a(k,j)=t Next Next For k=1 To 4 Print a(k,1);a(k,2);a(k,3);a(k,4) Next End Sub
参考答案:
答案解析: