title: While loop breaks unintentionally
body: <p>I am in my second week of C# training, so I am pretty new to programming. I have to make a program that returns the smallest integer out of a series of random integer inputs. Once the input = 0, the program should break out of the loop. I am only allowed to use while and for loops. For some reason my program breaks out of loop after the second input and it looks like it doesn't even care if there is a "0" or not. Could you please see where I went wrong? I have been busting my head off with this. Sorry if this question has already been posted by somebody else but I did not find an answer to it anywhere.</p>
  
  <p>PS: The zero input should be taken into account for the comparison.
  So this is what I've got so far:</p>
  
  <pre><code> class Program
   {
       static void Main()
       {
          int i = 0;
          int input = Int32.Parse(Console.ReadLine());
          int min = default;
  
          while (input != 0)
          {
              Console.ReadLine();
              if (i == 0)
              {
                  min = input;
                  break;
              }
  
              if (input &lt; min &amp;&amp; i !=0)
              {
                  input = Convert.ToInt32(Console.ReadLine());
                  min = input;
              } 
              i++;
          }
          Console.WriteLine(min);
      }
  </code></pre>