美文网首页
2018-11-22练习一

2018-11-22练习一

作者: 吾_5c00 | 来源:发表于2018-11-24 20:19 被阅读0次
            Console.WriteLine("欢迎进入迷你游戏平台");
            Console.WriteLine("请选择你喜欢的游戏:");
            Console.WriteLine("**********************************************************************************");
            Console.WriteLine(@"
                           1.斗地主
                           2.连连看
                           3.泡泡龙
                           4.切水果");
            Console.WriteLine("***********************************************************************************");
            Console.WriteLine("请选择");
           
            try {
                int num = Convert.ToInt32(Console .ReadLine  ());
                switch (num)
                {
                    case 1:
                        Console.WriteLine("您已进入斗地主房间");
                        break;
                    case 2:
                        Console.WriteLine("您已进入连连看房间");
                        break;
                    case 3:
                        Console.WriteLine("您已进入泡泡龙房间");
                            break ;
                    case 4:
                            Console.WriteLine("您已进入切水果房间");
                            break;
                }
    
             }
            catch
            {
                Console.WriteLine("你输入的是非数字,程序退出,请重新输入");
            }
            Console.ReadKey();
    

    相关文章

      网友评论

          本文标题:2018-11-22练习一

          本文链接:https://www.haomeiwen.com/subject/lfflqqtx.html