Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 03 / Solutions / 06. Polynomial_Solutions.cpp
blob: ba34792fb15fc1daa1f598e3bad0d3828f01254c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

using namespace std;

int main()
{
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;

	double fx;
	for (int x = -100; x <= 100; x++)
	{
		fx = a * x*x*x*x + b * x*x*x + c * x*x + d * x + e;
		if (fx >= 0)
			cout << x << " ";
	}
	cout << endl;
}