【VB开源代码栏目提醒】:网学会员为广大网友收集整理了,5.5.frm,希望对大家有所帮助!
VERSION 5.00
Begin VB.Form Form5
Caption = "Form5"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form5"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
Dim a(1 To 5) As Integer
Dim i As Integer
For i = 1 To 5
'输入5个元素并放入数组中
a(i) = InputBox("请输入第" & i & "个数组元素值")
Next i
For j = 5 To 2 Step -1
'插入排序
If a(j) < a(j - 1) Then
temp = a(j)
a(j) = a(j - 1)
a(j - 1) = temp
Else
Exit For
End If
Next j
For i = 1 To 5
'输出
Print a(i)
Next i
End Sub
上一篇:
5.3.3.frm
下一篇:
法律专业开题报告范文