Private Sub Command1_Click()
Dim x,y,z,a,b As Integer
For a = 10 To 31 '9的平方是2位数,所以从10开始,32的平方是4位数,所以到31为止
b = a * a
x = b 100
y = (b - x * 100) 10
z = b - 100 * x - 10 * y
If x = y Or x = z Or y = z Then Print b
Next
End Su
Private Sub Command1_Click()
Dim x,y,z,a,b As Integer
For a = 10 To 31 '9的平方是2位数,所以从10开始,32的平方是4位数,所以到31为止
b = a * a
x = b 100
y = (b - x * 100) 10
z = b - 100 * x - 10 * y
If x = y Or x = z Or y = z Then Print b
Next
End Su