switch分支2

This commit is contained in:
2025-11-07 21:06:49 +08:00
parent 4312688305
commit 1b880afc2b
3 changed files with 4 additions and 2 deletions

View File

@@ -11,6 +11,8 @@ func main() {
fmt.Println("You are 9%")
case 8:
fmt.Println("You are 8%")
//switch传透下一层
fallthrough
case 7:
fmt.Println("You are 7%")
case 6: