Search found 1 match

by masoud1459
Wed Feb 10, 2010 9:58 am
Forum: Volume 101 (10100-10199)
Topic: 10140 - Prime Distance
Replies: 17
Views: 9480

Re: 10140 - Prime Distance

hello ebrahim. u have a bit wrong in your code.
please compare this two code.

code 1:
for (int i = 2; i < MAXP; ++i)
if (!comp[MAXP])
{
primes[nprimes++] = i;
for (int j = i; j < MAXP; j += i)
comp[j] = true;
}
_____________________________________________________________
code 2:
for (int i ...

Go to advanced search