我用VBA写的,算不算?
Sub 全部2位绝对素数()
s = "shuru"
For I = 1 To 3 Step 2
For j = 1 To 9 Step 2
If 素数判断(10 * I + j) And 素数判断(10 * j + I) Then s = s & Chr(13) & IIf(I = j, I & j, I & j & Chr(13) & j & I)
Next j, I
MsgBox s
End Sub
Function 素数判断(I%) As Boolean
If I Mod 2 = 0 Then 素数判断 = False: Exit Function
For j = 3 To I / 2
If I Mod j = 0 Then 素数判断 = False: Exit Function
Next
素数判断 = True
End Function