لماذا يظهر في الخرج الكلمة NaN
عند تنفيذ البرنامج التالي:
int a, b, c;
double delta,solution1,solution2;
a = 1;
b = 1;
c = 1;
delta = b * b - 4 * a * c;
solution1 = (-b - Math.Sqrt(delta)) / (2 * a);
solution2 = (-b + Math.Sqrt(delta)) / (2 * a);
Console.WriteLine("Solution 1:{0}", solution1);
Console.WriteLine("Solution 2:{0}", solution2);