Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        private static void Task()
        {
            int[,] Arr2 = ToolsConsoleArr2.ReadArr2();
            ToolsArr2 toolsArr2 = new ToolsArr2(Arr2);

            bool[,] OutArr2 = toolsArr2.GetSaddlet();
            ToolsConsoleArr2.OutputArr2(OutArr2);
        }
Ejemplo n.º 3
0
        private static void Task()
        {
            int[,] Arr2 = ToolsConsoleArr2.ReadArr2();
            ToolsArr2   toolsArr2 = new ToolsArr2(Arr2);
            List <Cell> list      = toolsArr2.GetCels();

            ToolsConsoleArr2.OutputStr(ConvertList.ListToStr(list));
        }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     while (true)
     {
         int[,] Arr2 = ToolsConsoleArr2.ReadArr2();
         ToolsArr2 toolsArr2 = new ToolsArr2(Arr2);
         if (toolsArr2.Check())
         {
             Console.WriteLine("удволетворяет условию");
         }
         else
         {
             Console.WriteLine("не удволетворяет условию");
         }
     }
 }
Ejemplo n.º 5
0
 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"));
         }
     }
 }