title: Return an int array length n containing first n digits of pi? (c#)
body: <p>Per the subject line I am trying to return an int array length n containing the first n digits of pi.</p>
  
  <p>So MakePi(3) --> {3, 1, 4}</p>
  
  <p>I know I need to get pi and it gets stored as a double. I need to convert the double to a char so that I can search through the array to find each char, n in length. Then convert it back to an int array.</p>
  
  <p>I am having issues on where to go from here. I know there is a loop but I can't get my brain to figure out exactly what I need to do. Thanks!</p>
  
  <pre><code>public int[] MakePie(int n)
        {
          double pi = Math.PI;
          char newPi = Convert.ToChar(pi);
          char[] newArray = new char[n];
          newArray[0] = newPi;
          int numbers = Convert.ToInt32(pi);
  
          for (int i = 0; i &lt; n; i++)
          {
  
  
          }
          return newArray;
  
      }
  </code></pre>