Untitled
unknown
plain_text
2 years ago
424 B
1
Indexable
#include <iostream> using namespace std; int main() { float k, b; cin >> k >> b; long long x,y; cin >> x; y = k * x + b; if (x > 0 && y > 0) { cout << "1"; return 0; } if (x < 0 && y > 0) { cout << "2"; return 0; } if (x < 0 && y < 0) { cout << "3"; return 0; } else { cout << "4"; } }
Editor is loading...