Skip to content

Instantly share code, notes, and snippets.

@go-ive
Created September 27, 2013 11:59
Show Gist options
  • Save go-ive/6727527 to your computer and use it in GitHub Desktop.
Save go-ive/6727527 to your computer and use it in GitHub Desktop.
Project Euler - #1 Solution
package main
import (
"fmt"
)
func main() {
var sum int
for i := 0; i < 1000; i++ {
if i%3 == 0 || i%5 == 0 {
sum += i
}
}
fmt.Printf("%d\n", sum)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment