This code should read and display a matrix. But it doesnt work, I cant find the problem. Why it doesnt work?

```
#include <stdio.h>

#define MAX 100

void read_matrix(int a[MAX][MAX], int n)
{
    int i, j;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
            scanf("%d", &a[i][j]);
}

int main(void)
{
    int a[MAX][MAX], n = 1, i, j;

    read_matrix(a, n);

    for(i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            printf("%d ", a[i][j]);
        printf("\n");
    }

    return 0;
}

```

For input:

```
2
1 2
3 4

```

The output is:

```
1

```