public static void ChuongTrinh_GiaiPhuongTrinhBacHai() { double a = HTConnsole.NhapSoThuc("a="); double b = HTConnsole.NhapSoThuc("b="); double c = HTConnsole.NhapSoThuc("c="); if (a == 0) { Console.WriteLine("a khong the la 0"); return; } double[] nghiem = HTMath.PhuongTrinhBac2(a, b, c); if (nghiem.Length == 2) { Console.WriteLine("Phuong trinh co 2 nghiem la x1 = {0}, x2 = {1}", nghiem[0], nghiem[1]); } else if (nghiem.Length == 1) { Console.WriteLine("Phuong trinh co 1 nghiem la x = {0}", nghiem[0]); } else if (nghiem.Length == 0) { Console.WriteLine("Phuong trinh vo nghiem"); } }