python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
SML Sieve of Eratosthenes
I am new to SML. I am trying to create a function that outputs a list of all prime numbers which are smaller than or equal to a given integer n > 2 using the Sieve of Eratosthenes. I am running int...
Melty
Votes: 0
Answers: 1
Optimized Summation of all prime numbers under N
There was 10th question in project eular.
The problem is to find the sum of all prime numbers not greater than N.
My soln for the problem is :
int solve(int n){
bool check[n+1];
for(int i=0;i...
NITISH PANDEY
Votes: 0
Answers: 2