Click here to Skip to main content
12,350,451 members (24,632 online)
Click here to Skip to main content

Tagged as

Stats

7.4K views
Posted

Find Prime Numbers in C# Using the Sieve of Eratosthenes

, 12 Sep 2011 CPOL
Here's an alternative. This one uses the BitArray class in C# and does not use the % operator.static List SeiveWithoutMod(int candidate){ BitArray sieveContainer = new BitArray(candidate + 1, true); int marker = 2; //start int factor = 2; //start. sieveContainer[0]...

Views

Downloads

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Bill Anderson
Web Developer
United States United States
Developer

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 12 Sep 2011
Article Copyright 2011 by Bill Anderson
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid