已经完成:
Private Sub Picture1_Click()
Dim a(4, 4) As Integer, i As Integer, j As Integer, b(4, 4) As Integer
For i = 1 To 4
For j = 1 To 4
a(i, j) = Int(Rnd() 61 + 20)
Picture1Print a(i, j);
Next
Picture1Print
Next
Picture1Print
For i = 1 To 4
For j = 1 To 4
b(i, j) = a(j, i)
Picture1Print b(i, j);
Next
Picture1Print
Next
Picture1Print
End Sub
Private Sub Command1_Click()
Cls
Dim a(8) As Integer
For i = 0 To 8
If i Mod 3 = 0 Then Print
a(i) = 100 Rnd
Print a(i);
Next
For i = 0 To 2
For j = 0 To 2
Print a(i + j 3);
Next
Next
End Sub
Dim i, j, sum%
Dim s As String
For i = 1 To CInt(TextBox1TextTrim)
For j = 1 To CInt(TextBox1TextTrim)
s = s & i
Next
s = s & vbCrLf
sum = sum + i
Next
TextBox2Text = s
MsgBox(sum)
对角线之和没什麼意义,因为每一行都是相同的,随便取个数加起来就可以了
以上就是关于VB 用随机数(20~80)生成一个4行4列的矩阵A,求A的转置矩阵全部的内容,包括:VB 用随机数(20~80)生成一个4行4列的矩阵A,求A的转置矩阵、VB编程,随机生成一个3*3的矩阵,求出该矩阵的转置矩阵并打印在窗体。帮忙解答,小生提前谢了!、VB键盘输入方阵行列值N,生成方阵,例如,键盘输入4,生成矩阵如下所示: 1111 2222 3333 4444等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)