package main
import "fmt"
func main() {
for i := 0; i <= 120; i++ {
fmt.Print(i)
if i == 1 || i == 0{
fmt.Println(" は合成数でも素数でもない")
} else if i%2 == 0 && i != 2 {
fmt.Println(" は合成数")
} else if i%3 == 0 && i != 3 {
fmt.Println(" は合成数")
} else if i%5 == 0 && i != 5 {
fmt.Println(" は合成数")
} else if i%7 == 0 && i != 7 {
fmt.Println(" は合成数")
} else {
fmt.Println(" は素数")
}
fmt.Println("")
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: