美文网首页
2018-11-07

2018-11-07

作者: 柏建春 | 来源:发表于2018-11-07 14:56 被阅读0次

    #代码

    Console.WriteLine("请输入要计算的人的姓名");

               string name = Console.ReadLine();

               switch(name)

               {

                    case "老杨":

                        Console.WriteLine("老杨上辈子是折翼的天屎");

                        break;

                    case "老苏":

                        Console.WriteLine("老苏上辈子是老鸨子");

                        break;

                    case "老邹":

                        Console.WriteLine("老邹上辈子是老苏手下的头牌");

                        break;

                    case "老虎":

                        Console.WriteLine("上辈子被武松挂了");

                        break;

                    case "老牛":

                       Console.WriteLine("上辈子是Cow");

                        break;

                    default:

                        Console.WriteLine("上辈子没这个人");

                        break;

               }

               Console.ReadKey();

    #效果

    相关文章

      网友评论

          本文标题:2018-11-07

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