//phep tru static SoLon Tru(SoLon a, SoLon b) { if (b.ToString() == "0") { return(a); } else if (a.ToString() == "0") { return(b); } var max = Math.Max(a.arr.Length, b.arr.Length); var mangLon = MakeSameLength(a.arr, max); var mangNho = MakeSameLength(b.arr, max); if (a.Compareto(b) == -1) { mangLon = b.arr; mangNho = a.arr; } var ret = TruMang(mangLon, mangNho); return(new SoLon(ret)); }
//phep cong static SoLon Cong(SoLon a, SoLon b) { if (a.ToString() == "0") { return(b); } if (b.ToString() == "0") { return(a); } var ret = CongMang(a.arr, b.arr); return(new SoLon(ret)); }