title: To break nested loop
body: <p>I want to break the inner loop and increase the value of <code>x</code> if I find something at <code>Matrix[x][y]</code> but if I break in the <code>y for loop</code> it will just increase the value at <code>y loop</code> and not in the <code>x loop</code>. </p>
  
  <pre><code>int matrix[5][5]; //let's assume there are values inside
  for(int i = 0; i &lt; 5; i++)
     {
       for(int j = 0; j&lt;5;j++)
        {
          int radius = 1;
          for(int x = radius - 1; x &lt;= radius + i; x ++)
           {
            for(int y = radius -1; y &lt;= radius +j; y++)
              {
                 if((x+i) &gt;= 0 &amp;&amp; (y+j)&gt;=0)
                   {
        //for example I find the number 45 in the matrix, then the search radius should be increased by 1 and start it over again.
                    if(matrix[x][y] == 45)
                       {
                         radius++;
                         break; // but if i break here the x value wont be changed
                        }
  
                    }
               }
            }
        }
  </code></pre>