title: Finding maximum value in a column in an Array and printing other corresponding value in the same row
body: <p>I am trying to make program that finds the largest values in the second column of the array and prints this value (working program below), but then also prints the other corresponding value in the same row. </p>
  
  <pre><code>#include&lt;iostream&gt;;
  
  using namespace std;
  
  int main()
  {
     float array[3][2] = { { 16, 22 }, { 258, 1 }, { 42, 54 } };
     int i;
     float max = 0;
  
     for (i = 0; i&lt;3; i++)
     {
        if(array[i][1] &gt; max)
        {
           max = array[i][1];
        }
     }
  
     cout &lt;&lt; "The maximum value in the array is " &lt;&lt; max &lt;&lt; endl;
     return 0;
  }
  </code></pre>