예제 #1
0
 private void Fill_matrix_Click(object sender, EventArgs e)
 {
     try
     {
         matrix      = new Lab2_Library.Matrix(Tabel.Rows.Count, Tabel.Columns.Count, Tabel);
         output.Text = "Матрица заполнена";
     }
     catch {
         output.Text = "Создайте матрицу";
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            int n, m;

            Lab2_Library.Matrix matrix;

            while (true)
            {
                try
                {
                    Console.Write("Please, enter the number of rows in matrix: ");
                    n = Convert.ToInt32(Console.ReadLine());
                    Console.Write("Please, enter the number of columns in matrix: ");
                    m      = Convert.ToInt32(Console.ReadLine());
                    matrix = new Lab2_Library.Matrix(n, m);
                    break;
                }
                catch { }
            }
            matrix.PrintMatrix();
            matrix.NegativeInLast();
            matrix.PrintMatrix();
            matrix.PrintPositiveMatrix();
        }