package main
import "fmt"
import "math"
import "flag"
func main() {
var N int
flag.IntVar(&N, "N", 100, "")
numb := make([]bool, N)
limit := int(math.Sqrt(float64(N))) + 1
for i := 2; i < limit; i++ {
if !numb[i] {
for j := i * i; j < N; j += i {
numb[j] = true
}
for i := 2; i < N; i++ {
fmt.Printf("%d\n", i)
package main
import "fmt"
import "math"
import "flag"
func main() {
var N int
flag.IntVar(&N, "N", 100, "")
numb := make([]bool, N)
limit := int(math.Sqrt(float64(N))) + 1
for i := 2; i < limit; i++ {
if !numb[i] {
for j := i * i; j < N; j += i {
numb[j] = true
}
}
}
for i := 2; i < N; i++ {
if !numb[i] {
fmt.Printf("%d\n", i)
}
}
}