Go语言for当做while用法演示
package main import "fmt" func main() { sum := 0 for { sum ++ if sum > 10{ break }else{ fmt.Println(sum) } } }
Go语言for当做while用法演示
package main import "fmt" func main() { sum := 0 for { sum ++ if sum > 10{ break }else{ fmt.Println(sum) } } }