package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strings"
)

func main() {
	// TODO: implement switch statement
	for {
		fmt.Printf("输入数字(1 ~ 7), 返回星期几, 输入 q 退出:")
		reader := bufio.NewReader(os.Stdin)
		day, err := reader.ReadString('\n')
		if err != nil {
			log.Fatal(err)
		}
		day = strings.TrimSpace(day)
		switch day {
		case "q":
			fmt.Println("退出程序")
			return
		case "1":
			fmt.Println("Monday")
		case "2":
			fmt.Println("Tuesday")
		case "3":
			fmt.Println("Wednesday")
		case "4":
			fmt.Println("Thursday")
		case "5":
			fmt.Println("Friday")
		case "6":
			fmt.Println("Saturday")
		case "7":
			fmt.Println("Sunday")
		default:
			fmt.Printf("输入错误, 请重新输入\n\n")
		}
	}
}
