title: Why is my code not reading/printing forward, I am using loops to fill up arrays
body: <pre><code>using System.Collections.Generic;
  
  
  int s = 0;
  Console.WriteLine(&quot;How many soldiers: &quot;);
  s= Convert.ToInt32(Console.ReadLine());
  string[] sol = new string [s];
  Console.WriteLine(&quot;Enter names of &quot;+s +&quot;soldiers&quot;);
  
  for (int i = 0; i &lt; sol.Length; i++)
  {
      sol[i] = Console.ReadLine();
      Console.ReadLine();
  }
   
   Array.Sort(sol);
   Console.WriteLine(&quot;Names in order: &quot;);
  
   for (int i = 0; i &lt; sol.Length; i++)
   {
      Console.WriteLine(sol[i]);
   }
   
  Console.WriteLine(&quot;it works&quot;);
  </code></pre>
  <p>I am able to input number of soldiers and also their names but after that I get nothing. Also, if I remove the <code>console.readline()</code> from the first for loop, the program just closes. I am new to programming.</p>
  <p>What can I try next?</p>