主页
Go
Go 递归函数
demo_func10_1
运行 ❯
×
更改方向
保存代码
更改主题
package main import ("fmt") func testcount(x int) int { if x == 11 { return 0 } fmt.Println(x) return testcount(x + 1) } func main(){ testcount(1) }
1 2 3 4 5 6 7 8 9 10