从m到n 间的回文素数
dim m,n,p,l,y,j,k as integer
dim a(100) as integer
FOR j = m TO n
p = 0
FOR k = 2 TO INT(SQR(j))
IF j / k = j \ k THEN p = 1
NEXT k
IF j = 1 THEN p = 1
IF p = 0 THEN
y = j
l = 0
DO
l = l + 1
a(l) = y MOD 10
y = y \ 10
LOOP WHILE y > 0
FOR k = 1 TO l \ 2
IF a(k) <> a(l + 1 - k) THEN p = 1
NEXT k
IF p = 0 THEN msgbox(j)
END IF
NEXT j
Private Sub Command1_Click()
For i = 1 To 9
For j = 0 To 9
For k = 0 To 9
s = Int(i & j & k & j & i)
k = Int(Sqr(s))
a = 0
For l = 2 To k
If s Mod l = 0 Then
a = 1
End If
Next l
If a = 0 Then Text1 = Text1 & s & vbCrLf
Next k
Next j
Next i
End Sub