主页
Go
Go 嵌套 if 语句
demo_nestedif1
运行 ❯
×
更改方向
保存代码
更改主题
package main import ("fmt") func main() { num := 20 if num >= 10 { fmt.Println("Num is more than 10.") if num > 15 { fmt.Println("Num is also more than 15.") } } else { fmt.Println("Num is less than 10.") } }
Num is more than 10. Num is also more than 15.