int a, b, c, delta;
cout << "Enter value of a: ";
cin >> a;
cout << "Enter value of b: ";
cin >> b;
cout << "Enter value of c: ";
cin >> c;
cout << "We have a square function is: " << a << "x^2 + " << (b) << "x + " << (c);
delta = b*b - 4 * a*c;
cout << "Delta of the function is: " << delta << endl;
if (delta < 0) {
cout << "The function has no solution!!" << endl;
} else if (delta = 0) {
cout << "The function has only one solution which is: " << -b / 2 * a << endl;
} else if (delta > 0) {
cout << "The function has two solutions which are: " << (-b - sqrt(delta)) / 2 * a << " and " << (-b + sqrt(delta)) / 2 * a << endl; }
return 0;
system("pause");
}
Trong khi chạy chương trình thì nó bị out ra ngoài. Có ai giúp em tìm lỗi khắc phục không ạ. Thanks!!

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?