I must make a magic box, I already have the matrix and I read the values in it, later I want to add the rows first, but I don't know how to do it so that the positions 0.0,0,1,0,2 etc etc are automatically final part of the code like this
Console.WriteLine("suma filas");
for (i = 0; i < matriz.GetLength(0); i++)
{
for (j = 0; j < matriz.GetLength(1); j++)
{
if (i>sumafilas)
{
sumafilas += matriz[i, i];
}
}
Console.Write(sumafilas);
Console.WriteLine();
To perform the sums of a magic square using loops:
Greetings.