How to use regular Discriminant Primes in VBS
This article mainly shows you "how to use regular discriminant primes in VBS". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to use regular discriminant primes in VBS".
The copy code is as follows:
Set regex = New RegExp
Regex.Pattern = "^ 1 million $million ^ (11 percent?)\ 1 percent $"
For I = 1 To 100
If Not regex.Test (String (I, "1")) Then
WScript.Echo i
End If
Next
You will be dismissive when you see the title. Who won't enumerate prime numbers?
The copy code is as follows:
For I = 1 To 100
For j = 2 To I
If i Mod j = 0 Then Exit For
Next
If j = I Then WScript.Echo I
Next
It can be done in a few lines of code, it's so simple. Then take a look at the following program!
The copy code is as follows:
Set regex = New RegExp
Regex.Pattern = "^ 1 million $| ^ (11 percent?)\ 1 percent $"
For I = 1 To 100
If Not regex.Test (String (I, "1")) Then
WScript.Echo i
End If
Next
The above is all the contents of the article "how to use regular discriminant primes in VBS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!