24 lines
455 B
Text
24 lines
455 B
Text
Dim x, r, b, c, n, m As Integer
|
|
Dim a, d As String
|
|
Dim v(10), w(10) As Integer
|
|
Cls
|
|
For x = 1 To 5000000
|
|
a$ = ltrim$(Str$(x))
|
|
b = Len(a$)
|
|
For c = 1 To b
|
|
d$ = Mid$(a$, c, 1)
|
|
v(Val(d$)) = v(Val(d$)) + 1
|
|
w(c - 1) = Val(d$)
|
|
Next c
|
|
r = 0
|
|
For n = 0 To 10
|
|
If v(n) = w(n) Then r = r + 1
|
|
v(n) = 0
|
|
w(n) = 0
|
|
Next n
|
|
If r = 11 Then Print x; " Yes,is autodescriptive number"
|
|
Next x
|
|
Print
|
|
Print "End"
|
|
sleep
|
|
end
|