title: Using a global variable in a for loop
body: <pre><code>for (int i = number_1; i &gt; 0; i--)
  {
      int j = 2;
      printf("%*s", i - 1,"");
      for (j; j &gt; 0; j--)
      {
          printf("#");
      }
      printf("\n");
      j = j + 1;
  }
  </code></pre>
  
  <p>Here I'm trying to run my secondary for loop by taking a variable that is declared in the previous loop. It iterates and prints the symbol "#", then gets incremented again by 1 before the outer loop ends.</p>
  
  <p><strong>I'm getting this error</strong>:</p>
  
  <blockquote>
    <p>expression result unused</p>
  </blockquote>
  
  <p>What's going on here? I can certainly accomplish the task in a different way. But I'd like to find out why the code doesn't work in this case.</p>