title: Show only positive numbers in an array
body: <pre><code>main()
  {
      int i,j,n,a[10][10],b[10];
      printf(&quot;Intr. n=&quot;);
      scanf(&quot;%i&quot;,&amp;n);
      for(i=0;i&lt;n;i++)
          for(j=0;j&lt;n;j++)
              scanf(&quot;%i&quot;,&amp;a[i][j]);
      for(i=0;i&lt;n;i++) {
          printf(&quot;\n&quot;);
          for(j=0;j&lt;n;j++)
              printf(&quot;%5i&quot;,a[i][j]);}
      printf(&quot;\npozitive b:\n&quot;);
      for(i = 0; i &lt; n; i ++)
      {
          if(a[i][j] &gt;= 0)
          {
              printf(&quot;%d  &quot;, b[i]);
          }
      }
      getch();
  }
  </code></pre>
  <p>I have this code right here that creates a table and i wanted to create a separate one only with the positive numbers of the first one</p>
  <p>when i enter like the values 3 and 1 2 3 4 5 6 7 8 9 I get random numbers like 8 40 18421</p>