当前位置: 首页 > news >正文

Go - infinite loop

 

package mainimport "fmt"func main() {var n intfor {n++if n > 10 {break}fmt.Println(n)}
}