public Nguoi(Nguoi t2) { this.hoten = t2.hoten; this.chieucao = t2.chieucao; this.cannang = t2.cannang; this.namsinh = t2.namsinh; }
public Nguoi Tong(int f) { Nguoi t = new Nguoi(); t.Cannang = this.Cannang + f; return(t); }
public Nguoi Cong(Nguoi t2) { Nguoi t = new Nguoi(); t.Cannang = this.Cannang + t2.Cannang; return(t); }
public Nguoi DK() { Nguoi P = new Nguoi(); for (int i = 0; i < 5; i++) { P = P.Cong(ds[i]); } return(P); }
public void Nhap() { ds = new Nguoi[5]; for (int i = 0; i < 5; i++) { Console.WriteLine("Nhap nguoi thu {0}", i + 1); ds[i] = new Nguoi(); ds[i].Nhap(); } }