title: Loops when trying to give user feedback
body: <p>I'm trying to use the "while" function so everytime the user types a wrong username or password, the CMD tells the user either "Wrong username." or "Wrong password". I sort of did it now, the user can type it multiple times until they get the the correct answer, problem is that the CMD is not telling the user that the username/password they're using is wrong! I will post the whole code here:</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Hello
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              string name = "Michael";
              string pass = "coolguy";
              int time = 12;
              string NameInput;
              string PassInput;
              string Exit = "Y";
              string ExitInput;
  
              Console.Write("\nPlease, enter the time: ");
              time = int.Parse(Console.ReadLine());
              if (time &lt;= 12)
              {
                  Console.WriteLine("\nGood Morning. It's " + time + " AM");
              }
  
              else if (time &gt; 12)
              {
                  Console.WriteLine("\nGood Evening. It's " + time + " PM");
              }
  
              Console.WriteLine("\nPlease, enter your name.");
              do NameInput = Console.ReadLine();
              while (NameInput != name);
  
              Console.WriteLine("\n Welcome, Michael. Please, enter your password: ");
              do PassInput = Console.ReadLine();
  
              while (PassInput != pass);
  
              Console.WriteLine("\nYou successfully have logged in.");
              Console.WriteLine("\nType (Y) to log out.");
              ExitInput = Console.ReadLine();
              if (ExitInput == Exit)
              {
                  return;
              }
  
  
  
          }
      }
  }
  </code></pre>