Created
June 20, 2016 15:10
-
-
Save nemanjan00/23869d3fce0379363371610bc7496fc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prost(n){ | |
for(var i = 2; i <= math.Sqrt(n); i++){ | |
if(n % i == 0){ | |
return false || n == 2; | |
} | |
} | |
return true; | |
} | |
var prosti = []; | |
for(var i = 2; ; i++){ | |
(prost(i) && prosti.push(i)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment