title: How to SkipEvery 3rd element of the array
body: <p>I need help for the following code. I have an array, which <em>skip</em> every <code>3</code> elements in the array. The code works with <em>indexes</em> of the array.</p>
  
  <p>The parts with ----- have to fill with some code.</p>
  
  <p>Can anyone help me?
  I have the following code:</p>
  
  <p>I tried this.</p>
  
  <pre><code>static int[] SkipEvery(int[] numbers,int skip)
  {
      int[] skipped = new int[numbers.Length];
  
      for (int i = 0; i &lt; numbers.Length; i++)
      {
          if ((numbers[i]) % (skip + 1) == 0)
          {
              skipped[i] = numbers[i];
          }
          else
          {
              skipped[i] = numbers[i];
          }
      }
      return skipped;
  }
  
  public static void Main(string[] args)
  {
      int[] numbers = new int[] { 7, 2, 24, 69, 101, 42, 84, 100, 72 };
      numbers = SkipEvery(numbers, 3);
  }
  </code></pre>
  
  <p>The output must be </p>
  
  <pre><code>[0]7   [1]2   [2]24   [3]-1    [4]101   [5]42   [6]84   [7]-1   [8]72
  </code></pre>
  
  <p>But with this code the output is </p>
  
  <pre><code>[0]7   [1]2   [2]24   [3]69    [4]101   [5]42   [6]84   [7]100   [8]72
  </code></pre>