title: Fill array of length 5 with the digits of a 5 digit number
body: <p>I want an algorithm that will fill an array of Length 5 with the digits of a 5 digit number. E.g. if the given number is 45678 the array will have the contents |4|5|6|7|8|.</p>
  
  <p>The language that I'm using is C#.</p>
  
  <p>My code:</p>
  
  <pre><code>int[] matrix = new int[5]; 
  for (int i = 0; i &lt; matrix.Length; i++) { 
      Console.WriteLine("Enter a 5 digit number: ", i); 
      matrix[i] = Convert.ToInt32(Console.ReadLine()); 
  } 
  for (int i = 0; i &lt; matrix.Length; i++) { 
      Console.WriteLine(matrix[i]); 
  } 
  </code></pre>