Instantly share code, notes, and snippets.

Embed
What would you like to do?
RELUE
//
package main
import "fmt"
func main() {
var total int
var n int = 1000/3
for i:=1; i<n+1 ; i++ {
total+=i*3
}
n=(1000-1)/5
for i:=1; i<n+1 ; i++ {
total+=i*5
}
n=1000/15
for i:=1; i<n+1 ; i++ {
total-=i*15
}
fmt.Println(total)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment