Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- using namespace std;
- int main()
- {
- int a,b,c,d,i;
- cin >> a;
- cin >> b;
- cin >> c;
- cin >> d;
- for(i=-3000;i<=3000;i++)
- {
- if((a*pow(i,3))+(b*pow(i,2))+c*i+d==0)
- {
- cout << i;
- }
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement