【VB开源代码栏目提醒】:本文主要为网学会员提供6.4.3.frm,希望对需要6.4.3.frm网友有所帮助,学习一下!
VERSION 5.00
Begin VB.Form Form6
Caption = "Form6"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form6"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'选择排序子程序
Private Sub Sort(a() As Integer)
'数组为参数
Dim i%, j%, p%, n%, temp!
n = UBound(a)
For i = 1 To n - 1
p = i
For j = i + 1 To n
If a(p) > a(j) Then p = j
Next j
temp = a(i)
a(i) = a(p)
a(p) = temp
Next i
End Sub
Private Sub Form_Click()
'主程序
Dim stu(1 To 5) As Integer
Dim i As Integer
For i = 1 To 5
stu(i) = InputBox("请输入第" & i & "个数", "输入")
Next i
Call Sort(stu())
'调用函数
For i = 1 To 5
Print stu(i);
Next i
End Sub
上一篇:
6.4.2.frm
下一篇:
成本管理背景指导