Return to Snippet

Revision: 56395
at March 26, 2012 14:37 by ccw


Initial Code
final def MAX = 1000
def sum = 0
(3..MAX-1).each {
    if (it % 3 == 0 || it % 5 == 0) {
        sum += it
    }
}
println "sum => $sum"

Initial URL

                                

Initial Description
Project Euler in Groovy, Problem 1

Initial Title
[Project Euler in Groovy] - P1

Initial Tags

                                

Initial Language
Groovy