public static void print_mat(double[,] mat)
Console.Write(mat[i,j]+"\t");
public static double[,] int_reng(double[,] mat, int x, int y)
double[,] mat_ret = new double[4,5];
public static double[,] mult_reng(double[,] mat, int x, double r)
double[,] mat_ret = new double[4,5];
mat_ret[i,j] = r*mat[i,j];
public static double[,] suma_reng(double[,] mat, int x, double r, int y)
double[,] mat_ret = new double[4,5];
mat_ret[i,j] = mat[i,j] + r*mat[y,j];
public static void Main()
double[,] m = {{0.00, 0.01, 0.02, 0.03,0.04},
{1.00, 1.01, 1.02, 1.03,1.04},
{2.00, 2.01, 2.02, 2.03,2.04},
{3.00, 3.01, 3.02, 3.03,3.04}};
Console.WriteLine("Intercambiamos a los renglosnes "+i+" y "+j);
Console.WriteLine("Dividimos a el reng. "+j+" entre "+ (m[j,j]));
m = mult_reng(m, j, (1/m[j,j]));
Console.WriteLine("Restamos "+ m[i,j]+" veces el renglón " +j+" al renglón "+i);
m = suma_reng(m,i,-m[i,j],j);
Console.Write("\nEl valor de x es "+m[0,4]+".");
Console.Write("\nEl valor de y es "+m[1,4]+".");
Console.Write("\nEl valor de z es "+m[2,4]+".");
Console.Write("\nEl valor de w es "+m[3,4]+".");