简单啊,给你吧。
Private Sub Command1_Click()
x = InputBox("输入第一个数:")
y = InputBox("输入第二个数:")
z = InputBox("输入第三个数:")
Print " x y z"
Print "排序前 ", x, y, z
Print "排序后 ";
If x > y And x > z Then
If y > z Then
Print " ", x, y, z
Else
Print " ", x, z, y
End If
End If
If x > y And x > z Then
If y > z Then
Print " ", x, y, z
Else
Print " ", x, z, y
End If
End If
If y > x And y > z Then
If x > z Then
Print " ", y, x, z
Else
Print " ", y, z, x
End If
End If
If z > y And z > x Then
If y > x Then
Print " ", z, y, x
Else
Print " ", z, x, y
End If
End If
End Sub
界面自己做,把这段程序放到按钮的CLICK事件中。
温馨提示:答案为网友推荐,仅供参考