Untitled
unknown
plain_text
2 years ago
351 B
5
Indexable
#include <iostream>
using namespace std;
int chetvert(int x, int y) {
if (x > 0 && y > 0) {
return 1;
}
else if (x < 0 && y > 0) {
return 2;
}
else if (x < 0 && y < 0) {
return 3;
}
else if (x > 0 && y < 0){
return 4;
}
}
int main() {
int x, y;
cin >> x >> y;
int res = chetvert(x, y);
cout << res;
}
Editor is loading...