展开全部
Sub main()
Dim n1%, n2%, n3%
n1 = InputBox("n1=")
n2 = InputBox("n2=")
n3 = InputBox("n3=")
If n1 > n2 Then swap n1, n2
If n1 > n3 Then swap n1, n3
If n2 > n3 Then swap n2, n3
Debug.Print n1; n2; n3
End Sub
Sub swap(p1%, p2%)
Dim p%
p = p1
p1 = p2
p2 = p
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询