I know how to print a 2D array without using a function (using nested for loops), but how would I implement a fuction that prints it.

This is what I tried

```
int print_matrix(int arr[M][N])
{
    for (int i = 0; i < M; i++) 
    {
        for (int j = 0; j < N; j++) 
        {
            printf("{%i}",arr[i][j]);
        }
        printf("\n");
    }
}

```