using System;
public class Program
{
static void printMatrix(int[][] matrix) {
int rows = matrix.Length;
int cols = matrix[0].Length;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
Console.Write(matrix[i][j] + " ");
}
Console.WriteLine();
}
}
public static void Main(string[] args)
{
int[][] matrix = new int[][]
{
new int[] {7, 9, 4, 3, 1},
new int[] {4, 2, 9, 1, 3},
new int[] {4, 7, 8, 6, 2},
new int[] {0, 6, 9, 5, 4}
};
printMatrix(matrix);
}
}
/*
run:
7 9 4 3 1
4 2 9 1 3
4 7 8 6 2
0 6 9 5 4
*/