示例#1
0
            public MaTran Tong()
            {
                MaTran t = new MaTran();

                for (int i = 0; i < somt; i++)
                {
                    t = t.Tong(ds[i]);
                }
                return(t);
            }
示例#2
0
        public MaTran Tong(MaTran t2)
        {
            MaTran t = new MaTran();

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    t.a[i, j] = this.a[i, j] + t2.a[i, j];
                }
            }
            return(t);
        }
示例#3
0
 public void Nhap()
 {
     Console.Write("Nhap cap ma tran: ");
     MaTran.N = int.Parse(Console.ReadLine());
     Console.Write("Nhap so ma tran: ");
     somt = int.Parse(Console.ReadLine());
     ds   = new MaTran[somt];
     for (int i = 0; i < somt; i++)
     {
         Console.WriteLine("Nhap ma tran thu " + i);
         ds[i] = new MaTran();
         ds[i].Nhap();
     }
 }