2018-11-29

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication7 { class Program { static void Main(string[] args) { Console.WriteLine("欢迎进入魔法师迷你游戏平台"); Console.WriteLine("请选择您喜爱的游戏:"); Console.WriteLine("****************************************"); Console.WriteLine(@" 1.斗地主 2.斗牛 3.泡泡龙 4.连连看"); Console.WriteLine("****************************************"); Console.Write("请选择:"); string str_num = Console.ReadLine(); try { int num = Convert.ToInt32(str_num); 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(); } }

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • #代码 using System; using System.Collections.Generic; using...
    柏建春阅读 1,409评论 0 0
  • using System; using System.Collections.Generic; using Sys...
    柏建春阅读 1,427评论 0 0
  • using System; using System.Collections.Generic; using Sys...
    柏建春阅读 1,513评论 0 0
  • using System; using System.Collections.Generic; using Sys...
    柏建春阅读 1,477评论 0 0
  • using System; using System.Collections.Generic; using Sys...
    柏建春阅读 1,144评论 0 0

友情链接更多精彩内容