title: must save the position of the array element
body: <p>I used the translator. I'm sorry.</p>
  
  <p>Hello!
  C# I'm a beginner.
  Please help me because I'm having a hard time writing....
  Whenever the coordinates of the array change, I want to save the changed coordinates in a different array.
  What should I do?
  Please advise.
  You just have to show the direction.
  Thank you!</p>
  
  <pre><code>            string size = Console.ReadLine();
              int Consize = Convert.ToInt32(size);
              int[,] array = new int[Consize, Consize];
              for (int i = 0; i &lt; Consize; i++)
              {
                  string value = Console.ReadLine();
                  string[] result = value.Split();
  
                  for (int j = 0; j &lt; result.Length; j++)
                  {
                      int value2 = Convert.ToInt32(result[j]);
                      array[i, j] = value2;
  
  </code></pre>
  
  <p>this is an array A that stores the entered array.</p>
  
  <pre><code>            int x = 0, y = 0;
              string movePath = "";
              int _max = 0;
              while (x != Consize &amp;&amp; y != Consize)
              {
                  int[,] _array = new int[x, y];
                  int max = -101; 
                  int[] temp = new int[4] { -101, -101, -101, -101 };
  
                  if (x - 1 &gt; 0)
                      temp[0] = array[x - 1, y];
  
                  if (y - 1 &gt; 0)
                      temp[1] = array[x, y - 1];
  
                  if (x + 1 &lt; Consize)
                      temp[2] = array[x + 1, y];
  
                  if (y + 1 &lt; Consize)
                      temp[3] = array[x, y + 1];
  
                  int index = 0;
    for (int i = 0; i &lt; temp.Length; i++)
                  {
                      if (max &lt; temp[i])
                      {
                          max = temp[i];
                          index = i;
                      }
                  }
                  switch (index)
                  {
                      case 0:
                          movePath += "U";
                          _max += temp[0];
                          x--;
                          break;
                      case 1:
                          movePath += "L";
                          _max += temp[1];
                          y--;
                          break;
                      case 2:
                          movePath += "D";
                          _max += temp[2];
                          x++;
                          break;
                      case 3:
                          movePath += "R";
                          _max += temp[3];
                          y++;
                          break;
                      default:
                          break;
                  }
  </code></pre>
  
  <p>Compare each element of the array
  They move on to the big factor.
  I want to save the coordinates of the moving element in a different arrangement.</p>