mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:55:35 +08:00
update book code
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
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")
|
||||
}
|
||||
}
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user