Click here to Skip to main content
15,846,091 members
Articles / Programming Languages / C#

Find Prime Numbers in C# Using the Sieve of Eratosthenes

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Sep 2011CPOL 9K  
The following method starts by selecting the number 2 and eliminates each multiple of 2 up to N. Then the next valid number is selected and each multiple of it is eliminated. The process is repeated until all valid numbers have been tested. So the first three multiples to be eliminated are...

Views

Daily Counts

License

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


Written By
Student
Wales Wales
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions