Untitled

mail@pastecode.io avatar
unknown
plain_text
21 days ago
413 B
2
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	setlocale(LC_ALL, "russian");
	float a, b, c;
	int d;
	cout << "Введти A:"; cin >> a;
	cout << "Введти B:"; cin >> b;
	cout << "Введти C:"; cin >> c;
	d = (b * b) - 4 * a * c;
	if (d == 0) {
		cout << 1;
	}
	if (d > 0) {
		cout << 2;
  }
	if(d<0) {
		cout << "Не имеет корней.";
		}
	return 0;
	
}