vb上指针式动态时钟的程序代码
展开全部
Private Sub Command1_Click()
Dim i As Integer, j As Integer, A(4) As Integer
Dim temp As Integer
For i = 0 To 4
A(i) = InputBox("请输入数字:", "系统提示", 0)
Next i
i = 0
j = 4
For i = 0 To 3
For j = 4 To i + 1 Step -1
If A(j) < A(j - 1) Then
temp = A(j)
A(j) = A(j - 1)
A(j - 1) = temp
End If
Next j
Next i
For i = 0 To 4
Print CStr(A(i)) + " ";
Next i
End Sub
去试试看吧
效果如图
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询