Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
336 B
1
Indexable
Never
//домашка
#include <iostream>
#include <cmath>
#include <windows.h>
using namespace std;
int main()
{
    int a, b, c, d, x;
    cin >> a >> b >> c >> d;
    x = 1000;
    while (x >= 0){
        if (a * x * x * x + b * x * x + c * x + d == 0){
            cout << x;
        }
        x--;
    }
    return 0;
}
Leave a Comment