mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 04:48:29 +08:00
22 lines
281 B
Go
Executable File
22 lines
281 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"
|
|
}
|