Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <string>
- #include <algorithm>
- using namespace std;
- int main()
- {
- long long a, b, c, d;
- cin >> a >> b >> c >> d;
- for (int x = -100; x <= 100; ++x) {
- int x2 = x*x, x3 = x2*x;
- if (a*x3 + b*x2 + c*x + d == 0) cout << x << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement