Introduction - If you have any usage issues, please Google them yourself
The basic idea of using sieve to find prime numbers is to set up the positive integers from 1 to a certain extent, and 1 are not prime numbers. The smallest number in the remaining number is a prime number, and then the multiple of it is removed. The analogy is in turn until the sieve ends when it is empty. If there are:
12345678910
111213141516171819 20
212223242526272829 30
1 is not a prime number, get rid of it. The smallest number in the remaining 2 is the prime number, and the number of 2 is removed, and the remaining number is:
3579111315171921 23252729