Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MyMatrix matrix = new MyMatrix(3, 3);

            matrix.Show();

            Console.WriteLine(new string('-', 30));
            Console.WriteLine("[1][2] = {0}", matrix[1, 2]);
            matrix[0, 0] = 10;

            Console.WriteLine(new string('-', 30));
            matrix.Size(5, 4);
            matrix.Show();

            Console.WriteLine(new string('-', 30));
            matrix.ShowPart(1, 0, 3, 3);
            Console.ReadLine();
        }
Exemplo n.º 2
0
    {                                           //Автор в видео "выполнение домашнего задания" ещё советовал, если есть время,
        static void Main(string[] args)         //сделать нахождение определителя матрицы (вообще там много чего можно понаде-
        {                                       //лать - сложение, умножение и т.п....)
            MyMatrix matrix = new MyMatrix(10, 5);

            matrix.Show();

            Console.WriteLine(new string('-', 30));

            Console.WriteLine("элемент с индексом (1,4) = {0}", matrix[1, 4]);
            Console.WriteLine("элемент с индексом (5,3) = {0}", matrix[5, 3]);
            matrix[2, 2] = 100;
            Console.WriteLine("элемент с индексом (2,2) = {0}", matrix[2, 2]);

            Console.WriteLine(new string('-', 30));

            matrix.ChangeSize(5, 11);
            matrix.Show();

            Console.WriteLine(new string('-', 30));

            matrix.ShowPart(2, 3, 4, 10);
        }