示例#1
0
        public void tinhtong()
        {
            Matran a = ds[0];

            for (int i = 1; i < s; i++)
            {
                a = ds[0].tong(ds[i]);
                a.hien();
            }
        }
示例#2
0
 public void nhap()
 {
     Console.WriteLine("nhap so luong ma tran"); s = int.Parse(Console.ReadLine());
     ds = new Matran[s];
     for (int i = 0; i < s; i++)
     {
         ds[i] = new Matran();
         ds[i].nhap();
     }
 }
示例#3
0
        public Matran hieu(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);
        }
示例#4
0
        public Matran tong(Matran t2)
        {
            Matran t = new Matran(n);

            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);
        }