Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
236 B
2
Indexable
int a, b, c;
    cin >> a >> b >> c;
    float D;
    D = b ^ 2 - 4 * a * c;
    if (D > 0)
        cout << '2';
    else
        if (D == 0)
            cout << '1';
        else
            if (D<0)
            cout << "NO"