Skip to content

Instantly share code, notes, and snippets.

@isaacd9
Created July 12, 2018 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacd9/7a074b3fa1f3fabed4e03ad3945c14f2 to your computer and use it in GitHub Desktop.
Save isaacd9/7a074b3fa1f3fabed4e03ad3945c14f2 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
arr := [10000]bool{}
for i := 2; i < 500; i++ {
if arr[i] == false {
fmt.Println(i)
}
arr[2*i] = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment