Given numRows and numColumns, 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 numColumns = 3 prints:

Answer :

Answer:

#include <stdio.h>

int main(void)

{

  int Rows = 2;

  int Col = 3;

  int row = 0;

  char colm = 'A';

  char var = 'A';

   for (row = 1; row<=Rows; ++row){

 for (colm = 0; colm<Col; colm++){

    printf("%d", row);

    printf("%c ", var + colm % 3);

 }

}

        ++var;

     }

  }

  printf("\n");

  return 0;

}

Other Questions