ASCII Art#11607

You are given a matrix of size h \times w. Each number should be replaced with a character:

Let A_{i,j} = x. It is known that the value x = 1 corresponds to the letter '', and the value x = 26 corresponds to the letter ''. Therefore, if A_{i,j} = x, the character to print in the corresponding position is + '' - .

Algorithm implementation

Read the dimensions of the matrix.

scanf("%d %d", &h, &w);

Iterate through the matrix, and for each value , print the corresponding character.

for (i = 0; i < h; i++)
{
  for (j = 0; j < w; j++)
  {

    scanf("%d", &x);
    if (x == 0) printf(".");
    else printf("%c", x + 'A' - 1);
  }
  printf("\n");
}