⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5-12.frm

📁 本教材为“第2章”、“第4章”、“第7章”、“第8章”、“第10章”和“第12章”配备了附加练习题及答案
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3780
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   8010
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   15.75
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3780
   ScaleWidth      =   8010
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "构造并输出"
      Height          =   495
      Left            =   840
      TabIndex        =   4
      Top             =   2760
      Width           =   1935
   End
   Begin VB.TextBox Text2 
      Height          =   1695
      Left            =   4320
      MultiLine       =   -1  'True
      TabIndex        =   3
      Top             =   720
      Width           =   3495
   End
   Begin VB.TextBox Text1 
      Height          =   1695
      Left            =   240
      MultiLine       =   -1  'True
      TabIndex        =   2
      Top             =   720
      Width           =   3495
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "转置矩阵:"
      Height          =   315
      Left            =   4560
      TabIndex        =   1
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "矩阵A:"
      Height          =   315
      Left            =   480
      TabIndex        =   0
      Top             =   360
      Width           =   960
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim a(1 To 4, 1 To 4) As Integer
Dim i As Integer, j As Integer, t As Integer
Text1.Text = "": Text2.Text = ""
For i = 1 To 4
For j = 1 To 4
a(i, j) = (i - 1) * 4 + j
Text1.Text = Text1.Text & Format(a(i, j), "@@@@")
Next j
Text1.Text = Text1.Text & vbCrLf
Next i
For i = 1 To 4
For j = 1 To 4
If j > i Then
t = a(i, j): a(i, j) = a(j, i): a(j, i) = t
End If
Text2.Text = Text2.Text & Format(a(i, j), "@@@@")
Next j
Text2.Text = Text2.Text & vbCrLf
Next i
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -