标题:请问怎么把aName+mont+days拼成一句话呢?
取消只看楼主
DarkSuzaku
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-11-10
结帖率:0
已结贴  问题点数:1 回复次数:0 
请问怎么把aName+mont+days拼成一句话呢?
程序代码:
//下面的是代码
//我的意思就是把名字完整的输出来  在一行上   如果还不理解  请放vs里运行一下就知道了


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("测试你的古代姓名!");
            Console.WriteLine("准备好了,请回车!");
            Console.ReadKey();
            Console.WriteLine("请输入你名字的第一个字母!");
            string aName = Console.ReadLine();
            Console.WriteLine("请输入你几月份出生(阳历)");
            int mout = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入你几号出生(阳历)");
            int days = Convert.ToInt32(Console.ReadLine());
            #region 姓名选择
            if (aName == "a")
            {
                Console.WriteLine("慕容");
            }
            else if (aName == "b")
            {
                Console.WriteLine("");
            }
            else if (aName == "c")
            {
                Console.WriteLine("");
            }
            else if (aName == "d")
            {
                Console.WriteLine("");
            }
            else if (aName == "f")
            {
                Console.WriteLine("钟离");
            }
            else if (aName == "g")
            {
                Console.WriteLine("");
            }
            else if (aName == "h")
            {
                Console.WriteLine("东方");
            }
            else if (aName == "j")
            {
                Console.WriteLine("");
            }
            else if (aName == "k")
            {
                Console.WriteLine("");
            }
            else if (aName == "l")
            {
                Console.WriteLine("南宫");
            }
            else if (aName == "m")
            {
                Console.WriteLine("");
            }
            else if (aName == "n")
            {
                Console.WriteLine("司徒");
            }
            else if (aName == "o")
            {
                Console.WriteLine("尉迟");
            }
            else if (aName == "p")
            {
                Console.WriteLine("司空");
            }
            else if (aName == "q")
            {
                Console.WriteLine("");
            }
            else if (aName == "r")
            {
                Console.WriteLine("");
            }
            else if (aName == "s")
            {
                Console.WriteLine("西门");
            }
            else if (aName == "t")
            {
                Console.WriteLine("");
            }
            else if (aName == "w")
            {
                Console.WriteLine("");
            }
            else if (aName == "x")
            {
                Console.WriteLine("欧阳");
            }
            else if (aName == "y")
            {
                Console.WriteLine("");
            }
            else if (aName == "z")
            {
                Console.WriteLine("上官");
            }
            else
            {
                Console.WriteLine("您的姓名第一个字母真牛X,这都有哇!");
            }
#endregion
            #region 月份选择
            if (mout == 1)
            {
                Console.WriteLine("");
            }
            else if (mout == 2)
            {
                Console.WriteLine("");
            }
            else if (mout == 3)
            {
                Console.WriteLine("");
            }
            else if (mout == 4)
            {
                Console.WriteLine("");
            }
            else if (mout == 5)
            {
                Console.WriteLine("");
            }
            else if (mout == 6)
            {
                Console.WriteLine("");
            }
            else if (mout == 7)
            {
                Console.WriteLine("");
            }
            else if (mout == 8)
            {
                Console.WriteLine("");
            }
            else if (mout == 9)
            {
                Console.WriteLine("");
            }
            else if (mout == 10)
            {
                Console.WriteLine("");
            }
            else if (mout == 11)
            {
                Console.WriteLine("");
            }
            else if (mout == 12)
            {
                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("一年12个月,你能找到12月后,厉害!");
            }
            #endregion
            #region 天选择
            if (days == 1)
            {
                Console.WriteLine("");
            }
            else if (days == 2)
            {
                Console.WriteLine("");
            }
            else if (days == 3)
            {
                Console.WriteLine("");
            }
            else if (days == 4)
            {
                Console.WriteLine("");
            }
            else if (days == 5)
            {
                Console.WriteLine("");
            }
            else if (days == 6)
            {
                Console.WriteLine("");
            }
            else if (days == 7)
            {
                Console.WriteLine("");
            }
            else if (days == 8)
            {
                Console.WriteLine("");
            }
            else if (days == 9)
            {
                Console.WriteLine("");
            }
            else if (days == 10)
            {
                Console.WriteLine("");
            }
            else if (days == 11)
            {
                Console.WriteLine("");
            }
            else if (days == 12)
            {
                Console.WriteLine("");
            }
            else if (days == 13)
            {
                Console.WriteLine("");
            }
            else if (days == 14)
            {
                Console.WriteLine("");
            }
            else if (days == 15)
            {
                Console.WriteLine("");
            }
            else if (days == 16)
            {
                Console.WriteLine("");
            }
            else if (days == 17)
            {
                Console.WriteLine("");
            }
            else if (days == 18)
            {
                Console.WriteLine("");
            }
            else if (days == 19)
            {
                Console.WriteLine("");
            }
            else if (days == 20)
            {
                Console.WriteLine("");
            }
            else if (days == 21)
            {
                Console.WriteLine("");
            }
            else if (days == 22)
            {
                Console.WriteLine("");
            }
            else if (days == 23)
            {
                Console.WriteLine("");
            }
            else if (days == 24)
            {
                Console.WriteLine("");
            }
            else if (days == 25)
            {
                Console.WriteLine("");
            }
            else if (days == 26)
            {
                Console.WriteLine("");
            }
            else if (days == 27)
            {
                Console.WriteLine("");
            }
            else if (days == 28)
            {
                Console.WriteLine("");
            }
            else if (days == 29)
            {
                Console.WriteLine("");
            }
            else if (days == 30)
            {
                Console.WriteLine("");
            }
            else if (days == 31)
            {
                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("你一个月有31以上?");
            }
#endregion
            Console.ReadKey();
        }
    }
}



[ 本帖最后由 DarkSuzaku 于 2012-11-10 21:06 编辑 ]
2012-11-10 17:26



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-386652-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.059912 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved