Skip to content

Instantly share code, notes, and snippets.

@isaacd9
Created July 12, 2018 06:40
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/5ec2851e46ca9ec2329ab98c98cc7d4a to your computer and use it in GitHub Desktop.
Save isaacd9/5ec2851e46ca9ec2329ab98c98cc7d4a to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
arr := [100000000]bool{}
for i := 2; i < 100000000; 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