+ 2

Challenge

write programme in cpp that could find weather a number is prime or not

28th Aug 2017, 4:42 AM
Hassan Sajjad
Hassan Sajjad - avatar
6 Answers
+ 4
Firstly, it's "whether" not "weather" 😂 Secondly, the algorithm is almost always the same->sieve of erathnostanes Thirdly, here is my code: https://code.sololearn.com/cCG0NiHxo8l3/?ref=app 3.1 It is in python sorry 3.2 It gets a list of primes.
28th Aug 2017, 5:31 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
28th Aug 2017, 5:08 AM
Luca
Luca - avatar
+ 2
Till date I knew that Hatsy is a great poster, now I know that he is also a great commentor...
28th Aug 2017, 3:16 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
28th Aug 2017, 5:33 AM
Hassan Sajjad
Hassan Sajjad - avatar
+ 1
This is not to test, but it's a prime series... https://code.sololearn.com/cNJzc0HN41zd/?ref=app
28th Aug 2017, 3:16 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar