Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
272 B
1
Indexable
Never
#include <cmath>
#include <string>
#include <iostream>
using namespace std;
int main()
{
	int a, b, c, d, k;
	cin >> a >> b >> c >> d;
	for (int i = -100; i <= 101; i++)
	{
		if (a * pow(i, 3) + b * pow(i, 2) + c * i + d == 0) {
			cout << i << " ";
		}
	}
}