免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
Board logo

標題: 從年份計算中國生肖年 [打印本頁]

作者: mhfo    時間: 2020-10-26 17:02     標題: 從年份計算中國生肖年

public string SelectSX(int intYear)
        {
            string strText = "";
            switch (intYear % 12)
            {
                case 4:
                    strText = "鼠";
                    break;
                case 5:
                    strText = "牛";
                    break;
                case 6:
                    strText = "虎";
                    break;
                case 7:
                    strText = "兔";
                    break;
                case 8:
                    strText = "龍";
                    break;
                case 9:
                    strText = "蛇";
                    break;
                case 10:
                    strText = "馬";
                    break;
                case 11:
                    strText = "羊";
                    break;
                case 0:
                    strText = "猴";
                    break;
                case 1:
                    strText = "雞";
                    break;
                case 2:
                    strText = "狗";
                    break;
                case 3:
                    strText = "豬";
                    break;
            }
            return strText;
        }




歡迎光臨 魚骨頭的雲端圖書館 (http://mhfo.hotbbs.info/) Powered by Discuz! 7.0.0