public static void Main(string[] args)
int maxElement = int.MinValue;
Console.WriteLine("The elements on array is:");
for (int row = 0; row < matrix.GetLength(0); row++)
for (int col = 0; col < matrix.GetLength(1); col++)
Console.WriteLine(matrix[row, col]);
Console.WriteLine("The maximum element is:");
for (int row = 0; row < matrix.GetLength(0); row++)
for (int col = 0; col < matrix.GetLength(1); col++)
int curentElement = matrix[row, col];
if (curentElement >= maxElement)
maxElement = curentElement;
Console.WriteLine(maxElement);