Repeating Characters (A B C) in C
<p>Given numRows and numCols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Ex: numRows = 2 and numCols = 3 prints:
1A 1B 1C 2A 2B 2C </p>

<p>What I have:</p>

<pre><code>#include &lt;stdio.h&gt;

int main(void) {
   int numRows = 2;
   int numCols = 3;

   int rows = 0;
   char cols = 'A';
   char var = 'A';

   for (rows = 1; rows&lt;=numRows; ++rows){
      for (cols = 0; cols&lt;numCols; cols++){
         printf("%d", rows);
         printf("%c ", var);

         ++var;

      }

   }

   printf("\n");

   return 0;
}
</code></pre>

<p>It prints:</p>

<blockquote>
  <p>1A 1B 1C 2D 2E 2F</p>
</blockquote>

<p>But I would like it to print </p>

<blockquote>
  <p>1A 1B 1C 2A 2B 2C</p>
</blockquote>

<p>How do I get it to repeat A B C?</p>