Skip to content

Instantly share code, notes, and snippets.

@isaacd9
Created July 12, 2018 06:53
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/5b39fd539dd8e6743789213713f36065 to your computer and use it in GitHub Desktop.
Save isaacd9/5b39fd539dd8e6743789213713f36065 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
arr := [1000000]bool{}
for i := 2; i < 1000; i++ {
if arr[i] == false {
fmt.Println(i)
}
for x := 0; x <= i; x++ {
arr[x*i] = true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment