public static void Main()
Console.Write("Cuantas filas tiene la matriz:");
linea=Console.ReadLine();
int filas=int.Parse(linea);
Console.Write("Cuantas columnas tiene la matriz:");
linea=Console.ReadLine();
int columnas=int.Parse(linea);
mat=new int[filas,columnas];
for(int f = 0; f < mat.GetLength(0); f++)
for (int c = 0; c < mat.GetLength(1); c++)
Console.Write("Ingrese componente:");
linea = Console.ReadLine();
mat[f,c] = int.Parse(linea);
for(int f = 0; f < mat.GetLength(0); f++)
for(int c = 0; c < mat.GetLength(1); c++)
Console.Write(mat[f,c]+" ");
Console.WriteLine("Ultima fila");
for(int c = 0; c < mat.GetLength(1); c++)
Console.Write(mat[mat.GetLength(0)-1,c]+" ");