Private Sub Form_Click()
Dim a(3), i, j, k, x As Integer
x = Val(InputBox("x="))
If x < 100 Or x > 1000 Then Exit Sub
a(1) = x 100 '取百位上的数字
a(2) = x 10 Mod 10 '取十位上的数字
a(3) = x Mod 10 '取个位上的数字
Cls
For i = 1 To 3
For j = 1 To 3
For k = 1 To 3
If a(i) a(j) And a(j) a(k) And a(k) a(i) Then
Print a(i) & a(j) & a(k) & " ";
End If
Next
Next
Next
End Su