private static void Task() { int[,] Arr2A, Arr2B; do { Arr2A = ToolsConsoleArr2.ReadArr2(); if (Arr2A.GetLength(0) != Arr2A.GetLength(1)) { Console.WriteLine("не квадратный массив введите заново"); } } while (Arr2A.GetLength(0) != Arr2A.GetLength(1)); do { Arr2B = ToolsConsoleArr2.ReadArr2(); if (Arr2B.GetLength(0) != Arr2B.GetLength(1)) { Console.WriteLine("не квадратный массив введите заново"); } } while (Arr2B.GetLength(0) != Arr2B.GetLength(1)); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2A); int A = toolsArr2.GetDiagSum(); toolsArr2 = new ToolsArr2(Arr2B); int B = toolsArr2.GetDiagSum(); ToolsConsoleArr2.OutputStr(A + " " + B + " " + (A + B)); }
private static void Task() { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); bool[,] OutArr2 = toolsArr2.GetSaddlet(); ToolsConsoleArr2.OutputArr2(OutArr2); }
private static void Task() { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); List <Cell> list = toolsArr2.GetCels(); ToolsConsoleArr2.OutputStr(ConvertList.ListToStr(list)); }
static void Main(string[] args) { while (true) { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); if (toolsArr2.Check()) { Console.WriteLine("удволетворяет условию"); } else { Console.WriteLine("не удволетворяет условию"); } } }
static void Main(string[] args) { while (true) { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); if (Arr2.GetLength(0) != Arr2.GetLength(1)) { Console.WriteLine("не квадратная матрица"); } else { ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); IList <Row> list = toolsArr2.GetRowsSum(); ToolsConsoleArr2.OutputStr(ConvertList.ListToStr(list, "\r\n")); } } }