title: Multidimensional arrays to chessboard within C++
body: <p>So I have a multidimensional array with 5 rows and 2 columns. What I need to do now is output each element as a chessboard field. Furthermore, I need only the white fields.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main ()
  {
     int a[5][2] = {{0,0}, {1,2}, {2,4}, {3,6},{4,8}};
  
     for ( int i = 0; i &lt; 5; i++ )
        for ( int j = 0; j &lt; 2; j++ )
        {
           cout &lt;&lt; a[i] &lt;&lt; "\n" &lt;&lt; a[j] &lt;&lt; endl;
        }
  
     return 0;
  }
  </code></pre>
  
  <p>Do I just increment in one of the loops with +1 so that I escape the black fields? Because if so I kinda get confused as to which elements have to be skipped.</p>
  
  <p>Expected output:</p>
  
  <p><code>1 2 3 4 5 6
    7 8 9 1 2</code></p>
  
  <p>Tidied like that.</p>