go素数筛
已收录文章:1篇
-
先贴代码 package main import ( "fmt" ) // Send the sequence 2, 3, 4, ... to channel 'ch'. func generate(ch chan int) { for i := 2; ; i++ { ch <- i // Send 'i' to channel 'ch'. } } // Copy the values from channel 'in' to channel 'out',335 收藏