C++ 代码
#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
int main(){
double x, y;
scanf("%lf%lf",&x, &y);
if (x == 0) {
if (y == 0) cout << "Origem";
else cout << "Eixo Y";
return 0;
}
else if (y == 0) {
cout << "Eixo X";
return 0;
}
if (x > 0){
if (y < 0) cout << "Q4";
else cout << "Q1";
}
else if (x < 0){
if (y < 0) cout << "Q3";
else cout << "Q2";
}
return 0;
}