mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
17 lines
289 B
Go
Executable File
17 lines
289 B
Go
Executable File
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
fmt.Printf(Season(3))
|
|
}
|
|
|
|
func Season(month int) string {
|
|
switch month {
|
|
case 12,1,2: return "Winter"
|
|
case 3,4,5: return "Spring"
|
|
case 6,7,8: return "Summer"
|
|
case 9,10,11: return "Autumn"
|
|
}
|
|
return "Season unknown"
|
|
} |