1)
double c = 0, b = 0;
double[,] a = new double[4, 3] { { 4.3, 5.7, 3.5 }, { 10.1, 6.2, -11 }, { 25, 3.2, 4.8 }, { 0.3, -4, 25 } };
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++)
Console.Write("{0}{1}", a[i, j], "\t");
Console.WriteLine();
}
c = a[0, 0] + a[0, 1] + a[0, 2];
b = a[1, 0] + a[1, 1] + a[1, 2];
Console.WriteLine("Сумма 1 строки={0}",c );
Console.WriteLine("Сумма 2 строки={0}",b);
Console.ReadLine();
1)
double c = 0, b = 0;
double[,] a = new double[4, 3] { { 4.3, 5.7, 3.5 }, { 10.1, 6.2, -11 }, { 25, 3.2, 4.8 }, { 0.3, -4, 25 } };
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++)
Console.Write("{0}{1}", a[i, j], "\t");
Console.WriteLine();
}
{
c = a[0, 0] + a[0, 1] + a[0, 2];
b = a[1, 0] + a[1, 1] + a[1, 2];
Console.WriteLine("Сумма 1 строки={0}",c );
Console.WriteLine("Сумма 2 строки={0}",b);
}
Console.ReadLine();