Click here to Skip to main content
15,881,281 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sieve of Eratosthenes PinPopular
J4amieC12-Sep-12 5:23
J4amieC12-Sep-12 5:23 
GeneralRe: Sieve of Eratosthenes Pin
WebMaster12-Sep-12 5:48
WebMaster12-Sep-12 5:48 
GeneralRe: Sieve of Eratosthenes Pin
J4amieC12-Sep-12 5:59
J4amieC12-Sep-12 5:59 
GeneralRe: Sieve of Eratosthenes Pin
WebMaster12-Sep-12 6:11
WebMaster12-Sep-12 6:11 
GeneralRe: Sieve of Eratosthenes Pin
Rage12-Sep-12 6:23
professionalRage12-Sep-12 6:23 
GeneralRe: Sieve of Eratosthenes Pin
Pete O'Hanlon12-Sep-12 6:25
mvePete O'Hanlon12-Sep-12 6:25 
AnswerProper implementation of Sieve of Eratosthenes Pin
Clifford Nelson12-Sep-12 10:45
Clifford Nelson12-Sep-12 10:45 
GeneralRe: Proper implementation of Sieve of Eratosthenes Pin
WebMaster12-Sep-12 11:00
WebMaster12-Sep-12 11:00 
I want the sum of prime numbers not count of them!

C#
long sum = 0;
for (int i = 0; i < _numbers.Length - 1; i++)
{
   if (_numbers[i])
      sum += i;
}


Thank you for your time.
Meysam


modified 12-Sep-12 17:12pm.

AnswerRe: Proper implementation of Sieve of Eratosthenes Pin
Clifford Nelson12-Sep-12 11:20
Clifford Nelson12-Sep-12 11:20 
GeneralRe: Proper implementation of Sieve of Eratosthenes Pin
Dave Kreskowiak12-Sep-12 12:44
mveDave Kreskowiak12-Sep-12 12:44 
GeneralRe: Proper implementation of Sieve of Eratosthenes Pin
Clifford Nelson12-Sep-12 13:07
Clifford Nelson12-Sep-12 13:07 
GeneralRe: Proper implementation of Sieve of Eratosthenes Pin
Dave Kreskowiak12-Sep-12 18:25
mveDave Kreskowiak12-Sep-12 18:25 
AnswerRe: Sieve of Eratosthenes Pin
Thomas Daniels12-Sep-12 5:29
mentorThomas Daniels12-Sep-12 5:29 
AnswerRe: Sieve of Eratosthenes Pin
Kenneth Haugland13-Sep-12 3:33
mvaKenneth Haugland13-Sep-12 3:33 
AnswerRe: Sieve of Eratosthenes Pin
PIEBALDconsult12-Sep-12 14:23
mvePIEBALDconsult12-Sep-12 14:23 
QuestionSubstitution of Paths in HyperLinkField with File Names Pin
ASPnoob12-Sep-12 4:23
ASPnoob12-Sep-12 4:23 
AnswerRe: Substitution of Paths in HyperLinkField with File Names Pin
Pete O'Hanlon12-Sep-12 4:55
mvePete O'Hanlon12-Sep-12 4:55 
GeneralRe: Substitution of Paths in HyperLinkField with File Names Pin
ASPnoob12-Sep-12 9:59
ASPnoob12-Sep-12 9:59 
QuestionRetrieve name of Printer using SendMessage Pin
toBeH_S11-Sep-12 22:10
toBeH_S11-Sep-12 22:10 
AnswerRe: Retrieve name of Printer using SendMessage Pin
Rage12-Sep-12 6:40
professionalRage12-Sep-12 6:40 
GeneralRe: Retrieve name of Printer using SendMessage Pin
toBeH_S12-Sep-12 8:33
toBeH_S12-Sep-12 8:33 
GeneralRe: Retrieve name of Printer using SendMessage Pin
Rage12-Sep-12 21:25
professionalRage12-Sep-12 21:25 
GeneralRe: Retrieve name of Printer using SendMessage Pin
toBeH_S16-Sep-12 15:18
toBeH_S16-Sep-12 15:18 
QuestionRandom Permutation Interface Pin
Skippums11-Sep-12 15:58
Skippums11-Sep-12 15:58 
AnswerRe: Random Permutation Interface Pin
Dave Kreskowiak11-Sep-12 17:44
mveDave Kreskowiak11-Sep-12 17:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.