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; }