public static void Main()
Console.WriteLine("Tìm nghiệm của phương trình bậc 2 có dạng: ax2 + bx +c = 0");
Console.WriteLine("Hãy nhập giá trị của a , b , c : ");
int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int c = Convert.ToInt32(Console.ReadLine());
float d = (float)b * b - 4 * (float)a * c;
Console.WriteLine("Phương trình vô nghiệm.");
float x = (float)(-b) / (2 * a);
Console.WriteLine("x1=x2=" +x);}
double x1 = -b - Math.Sqrt(d) / (2 * a);
double x2 = -b + Math.Sqrt(d) / (2 * a);
Console.WriteLine("x1=" +x1);
Console.WriteLine("x2=" +x2);