title: Trying to get a user input to make a 2-D array multiplication table
body: <pre><code>int main (void)
  {
      int range, i, j;
  
      printf("Input size of multiplication table: ");
      scanf("%i", &amp;range);
  
      int output[range][range];
  
      for (i = 0; i&lt;=range; ++i)
      {
          for (j=0; j&lt;=range; ++j)
          {
              output[i][j] = i * j;
              if(j!=range &amp;&amp; output[i][j] != 0)
              {
                  printf("%3i ", output[i][j]);
              }
              else if (j==range)
              {
                  printf("%3i", output[i][j]);
              }
              else if (output[i][j] == 0)
              {
                  printf("%3i "), i+2;
              }
              else
              {
                  printf("%3i", j + i - range);
              }
          }
          printf("\n");
      }    
      return 0;
  }
  </code></pre>
  
  <p>I am having it output:</p>
  
  <pre><code>0   1   2   3   4   0
  5   1   2   3   4   5
  10   2   4   6   8  10
  15   3   6   9  12  15
  20   4   8  12  16  20
  25   5  10  15  20  25
  </code></pre>
  
  <p>and I need the 0 on the end to be a five and the first column to be 0,1,2,3,4,5 instead of 0,5,10,15,20,25.
  If anyone could help I would appreciate it.</p>