Option Explicit
成都创新互联成立与2013年,先为扎囊等服务建站,扎囊等地企业,进行企业商务咨询服务。为扎囊企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
Option Base 1
Dim a(4, 4) As Integer
Private Sub Command1_Click()
Dim 雀颤凯i As Integer, j As Integer
Picture1.Cls
Randomize
For i = 1 To 4
For j = 1 To 4
a(i, j) = Int(Rnd * 9) + 1
Picture1.Print a(i, j);
Next j
Picture1.Print
Next i
End Sub
Private Sub Command2_Click()
Dim i As Integer, j As Integer
Dim b(4, 4) 顷唤As Integer
Picture2.Cls
For i = 1 To 4
For j = 1 To 4
b(i, j) = a(j, i)
Picture2.Print b(i, j);
Next j
Picture2.Print
Next i
End Sub
Private Sub Command3_Click()
Dim i As Integer, j As Integer, temp As Integer
Picture2.Cls
For i 洞谨= 1 To 4
For j = i To 4
temp = a(i, j)
a(i, j) = a(j, i)
a(j, i) = temp
Next j
Next i
For i = 1 To 4
For j = 1 To 4
Picture2.Print a(i, j);
Next j
Picture2.Print
Next i
End Sub
Dim a(6, 6) As Integer, i As Integer, ii As Integer
Private Sub Command1_Click()
For i = 1 To 6
For ii = 1 To 4
a(i, ii) = Int(Rnd * 90 + 10)
Next ii
Next i
For i = 1 To 6
For ii = 1 To 4
侍唯 Picture1.Print a(i, ii);
陆谈清 Next ii
Picture1.Print ""
Next i
End Sub
Private Sub Command2_Click()
For ii = 1 To 4
早前 For i = 1 To 6
Picture2.Print a(i, ii);
Next i
Picture2.Print
Next ii
End Sub
在程序设计者裤语言里,用二维数组来保存矩阵的值。
一维列矩阵,就是由:若干行、丛空一列组成的二维数组。
一维行矩阵,就是由:一行、若干列组成的二维数组。
比如一维列矩阵,的输入:
dim a(10,1) as integer '渗嫌瞎10行,1列
dim i as integer
for i = 1 to 10
a(i,1) = inputbox("")
next i
网页名称:vb点虐
矩阵转置 编写一个3×3矩阵转置的函数
当前地址:https://www.cdcxhl.com/article10/ddpsgdo.html
成都网站建设公司_创新互联,为您提供网站内链、ChatGPT、外贸网站建设、网站导航、小程序开发、移动网站建设
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联