Advertisement
IISergeyII

Untitled

May 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <string>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main()
  10. {
  11.     long long a, b, c, d;
  12.     cin >> a >> b >> c >> d;
  13.  
  14.  
  15.     for (int x = -100; x <= 100; ++x) {
  16.         int x2 = x*x, x3 = x2*x;
  17.         if (a*x3 + b*x2 + c*x + d == 0) cout << x << " ";
  18.     }
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement