美文网首页
2018-11-14作业1

2018-11-14作业1

作者: 追魂_409e | 来源:发表于2018-11-14 14:57 被阅读0次

      string name = "";

               string pwd = "";

               do

               {

                    Console.WriteLine("请输入用户名");

                    name =Console.ReadLine();

                    Console.WriteLine("请输入密码");

                   pwd =Console.ReadLine();

                    if (name != "admin" || pwd != "888888")

                    {

                        Console.WriteLine("用户名或密码错误");

                    }

               }while (name != "admin" || name != "888888");

               Console.ReadKey();  string name = "";

               string pwd = "";

               //循环体:输入用户名和密码 判断

               //循环条件:输入错误

               do

               {

                    Console.WriteLine("请输入用户名");

                    name =Console.ReadLine();

                    Console.WriteLine("请输入密码");

                   pwd =Console.ReadLine();

                    if (name != "admin" || pwd != "888888")

                    {

                        Console.WriteLine("用户名或密码错误");

                    }

               }while (name != "admin" || name != "888888");

               Console.ReadKey();

    相关文章

      网友评论

          本文标题:2018-11-14作业1

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