challenges/e1/e1.go

16 lines
153 B
Go
Raw Normal View History

2014-08-21 05:19:38 +00:00
package main
import (
"fmt"
)
func main() {
sum := 0
for i := 1; i < 1000; i++ {
if i%3 == 0 || i%5 == 0 {
sum += i
}
}
fmt.Println(sum)
}