Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Think
I dont need a code!
its not a homework.
if everyone tells homework.... he(she)is a silly!!!!!!

its possible to run Sieve Of Eratosthenes without start 1?



This is a Mathematical Question!!!!

What I have tried:

its possible to run Sieve Of Eratosthenes without start 1?
Posted
Updated 29-Jan-17 6:17am
v2
Comments
PIEBALDconsult 29-Jan-17 12:18pm    
I don't recommend starting at 1 at all.
I don't even start mine with 2, I always start at 3.

Quote:
its possible to run Sieve Of Eratosthenes without start 1?

What about running normal Eratosthenes sieve and then remove unwanted answers ?
Eratosthenes sieve is an algorithm made to start from the beginning, you can't start is at an arbitrary value.
 
Share this answer
 
Yes. You can start it with 2.

Other than that, how many times do we have to tell you that we do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
Comments
[no name] 30-Jan-17 2:51am    
no !

This is a Mathematical Question!!!!
you accept that you are a silly!
 
Share this answer
 
Comments
[no name] 30-Jan-17 2:53am    
yes it works carefully!
thanks.
its not possible to start at each number . we must run this sieve from 2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900