+ 4

<<Challenge!>> : Prime numbers !

Make a program (any language) for finding prime numbers from 1 to given X and print them in list. Hint: the prime numbers are divided by 1 and themselves. (I added my version in python, please try it before you see the solution...) https://code.sololearn.com/cBs771u9MOht/?ref=app

23rd Sep 2017, 11:42 AM
Αλέξανδρος Ρόθος
Αλέξανδρος Ρόθος - avatar
6 Respostas
+ 5
https://code.sololearn.com/ciK6t1NcM2tR/?ref=app
23rd Sep 2017, 6:42 PM
David Ashton
David Ashton - avatar
+ 4
Mine here. A bit long and complicated but all that because of better output look. https://code.sololearn.com/cPb82Zv2wmrY/?ref=app
23rd Sep 2017, 1:18 PM
Tim Thuma
Tim Thuma - avatar
+ 4
#You didn't stated in your challenge that we can't use inbuilt method. So, this is also one of the solution of your challenge. #Ruby require 'prime'; puts Prime.take(gets.to_i)
25th Sep 2017, 12:58 PM
Ekansh
24th Sep 2017, 7:55 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
+ 2
Wait
23rd Sep 2017, 12:44 PM
Kartikey Sahu
Kartikey Sahu - avatar
23rd Sep 2017, 12:59 PM
Kartikey Sahu
Kartikey Sahu - avatar