Created
April 26, 2013 18:00
-
-
Save jonatasemidio/5469119 to your computer and use it in GitHub Desktop.
Calculo de números primos.
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
def t = 1..100 | |
def v = [] | |
t.each { n -> | |
(2..n).each { d -> | |
if (n % d == 0 && n != d) | |
v.add(n) | |
} | |
} | |
println t - v - 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment