title: My code doesn't seem to work perfectly (always same message)
body: <p>Hello guys i got this code , i want to check if it's perfect array</p>
  <pre><code>perfect array means that the sum of his cases of one line equal the sum of the first case of each line
  </code></pre>
  <p>i tried to full the array with numbers then compare it's sum with the actual sum of it really meets
  the issue is no matter what i type it displays that it's a perfect array even if it's not . HELP please  i'm stuck here .</p>
  <pre class="lang-c prettyprint-override"><code>#include&lt;stdio.h&gt;
  
  #define l 10
  #define c 15
  int main() {
    int T[l][c];
    int i, j, som, sl, sc, n;
    bool prl, prc; //parfait ligne ..
    
    // Saisie des données de tb matrice 
    printf(&quot;Dimension de la matrice carree (max.50) : &quot;);
    scanf(&quot;%d&quot;, &amp; n);
    
    //triatemnt de tb matrice
    for (i = 0; i &lt; n; i++)
      for (j = 0; j &lt; n; j++) {
        printf(&quot;Element[%d][%d] : &quot;, j, j);
        scanf(&quot;%d&quot;, &amp; T[i][j]);
      }
      
    // traitement de matrise parfait
    som = 0;
    for (j = 0; j &lt; c; j++) {
      som += T[1][j];
    }
    
    i = 2;
    prl = true;
    while (i &lt;= n &amp;&amp; prl) {
      som = 0;
      for (j = 0; j &lt; l; j++) {
        som += T[i][j];
      }
      if (som != sl) {
        prl = false;
      }
      i += 1;
    }
    
    j = 2;
    prc = true;
    while (j &lt;= c &amp;&amp; prc) {
      som = 0;
      for (i = 0; i &lt; c; i++) {
        som += T[i][j];
      }
      if (som != sc) {
        prc = false;
      }
      j += 1;
    }
    
    // affiche si parfait ou non 
    if (prl || prc) {
      printf(&quot;matrice parfaite \n&quot;);
    } else
      printf(&quot;matrice non parfaite \n&quot;);
      
    // Affichage de la tb matrice 
    printf(&quot;Matrice donnee :\n&quot;);
    for (i = 0; i &lt; n; i++) {
      for (j = 0; j &lt; n; j++)
        printf(&quot;%7d&quot;, T[i][j]);
      printf(&quot;\n&quot;);
    }
    return 0;
  }
  </code></pre>