Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SEGMENTED SIEVE
#include<iostream> using namespace std; void simpleSieve(int limit,int primes){ bool mark[limit+1]; memset(mark,true,sizeof(mark); int i,j for(i=2;i*i<limit;i++){ if(mark[i]==true){ for(j=2*i;j<limit;j=j+i) mark[j]=false; } } for(i=2;i<limit;i++){ if(mark[i]==true){ cout<<i; primes.pushback[i]; } } }
run
|
edit
|
history
|
help
0
float precision test
macros
base and derr con
GCC compiler bug (should output 0 1)
TupleTel
Rotate array
NonparaRuns
Test 2(2021)
ISPrime
Dar