For n = 1 To 1000000
n2 = n * n
ns$ = LTrim(Str(n))
n2s$ = LTrim(Str(n2))
ix = InStr(n2s, ns)
If ix > 1 And ix + Len(ns) <= Len(n2s) Then
good = 0
For i = ix + Len(ns) To Len(n2s)
If Mid(n2s, i, 1) > "0" Then good = 1: Exit For
Next
If good Then Text1.Text = Text1.Text & n & Str(n2) & crlf: ct = ct + 1
End If
If ct >= 100 Then Exit For
DoEvents
Next
|
Posted by Charlie
on 2019-04-11 15:27:08 |