📄 2.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "排序输出"
Height = 495
Left = 720
TabIndex = 0
Top = 2400
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Sub Command1_Click()
Dim i, j As Integer, s As String
Dim xing
xing = Array("白", "张", "刘", "林", "李", "王", "赵", "毛", "方", "邓", "苏", "黄", "胡", "江", "马", "吴")
For i = 1 To 16 - 1
For j = 1 To 16 - i
If xing(j) >= xing(j + 1) Then
s = xing(j)
xing(j) = xing(j + 1)
xing(j + 1) = s
End If
Next j
Next i
Cls
Print Spc(18); "姓式排序"
For i = 1 To 16
Print CStr(i); Spc(1); xing(i); Spc(1);
If i = 9 Then Print
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -