mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 22:53:43 +08:00
17 lines
249 B
Go
17 lines
249 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var num1 int = 100
|
|
|
|
switch num1 {
|
|
case 98, 99:
|
|
fmt.Println("It's equal to 98")
|
|
case 100:
|
|
fmt.Println("It's equal to 100")
|
|
default:
|
|
fmt.Println("It's not equal to 98 or 100")
|
|
}
|
|
}
|