title: C++ how to print out array values next to each other rather than underneath
body: <p>I have made this section of code and would like it to print out like so: </p>
  
  <pre>Element Value
    0       0
    1       0
    2       0
    3       0
    4       0
    5       0
    6       0
    7       0
    8       0
    9       0</pre>
  
  <p>Instead of being underneath of each other. Could any one point me in the correct direction? </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main(){
  
      int n[10] = {1,2,3,4,5,6,7,8,9,10};
      int x[10] = {0,0,0,0,0,0,0,0,0,0};
  
      std::cout &lt;&lt; "Element" &lt;&lt;std::endl;
      for(int i = 0; i &lt; 10; i++)
      {
          std::cout  &lt;&lt;n[i] &lt;&lt; std::endl;
      }
  
      std::cout &lt;&lt; "Value" &lt;&lt;std::endl;
      for(int y = 0; y &lt;10; y++)
      {
          std::cout  &lt;&lt; x[y] &lt;&lt; std::endl;
      }
  
      std::cout &lt;&lt; "size of array: " &lt;&lt; sizeof(n) &lt;&lt; std::endl;
  
  }
  </code></pre>