The Sieve of Eratosthenes returns a list of all prime numbers up to a given integer n by creating a list of candidate primes h2, 3, . . . , ni, and repeatedly marking the first unmarked number p as prime and striking out all entries in the list that are multiples of p. See the Sieve in action in Figure 7.15
1.Write pseudocode to describe the Sieve of Eratosthenes.
2.Run the algorithm, by hand, to find all primes less than 100.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here