Private Sub Command1_Click()
For i = 1 To 999
For j = 1 To 999
a = i * j
a1 = Sqr(a)
b1 = CStr(a1)
b = CStr(a)
c = Len(b)
c1 = c
k = Mid(b, 1, 1)
n = 1
kk = ""
For t = 2 To c
k1 = Mid(b, t, 1)
If k <> k1 And InStr(kk, k1) <= 0 Then
n = n + 1
kk = kk & k1
End If
Next
If n = 2 And InStr(b1, ".") <= 0 Then
aa = a & "=" & b1 & "*" & b1
n1 = 0
For h = 0 To List1.ListCount
If aa = List1.List(h) Then
n1 = n1 + 1
End If
Next
If n1 = 0 Then List1.AddItem aa
End If
Next
Next
End Sub
问题解决了!水平有限所以代码不精简.
[此贴子已经被作者于2006-5-5 20:07:29编辑过]
IT618资讯网 提供服务端开发,前端开发,网页特效,热门开源系统研究,软件下载,站长建站,淘宝开店等学习资料.