足够接近使用的一个精度eps
#include<stdio.h>
int main(){
double x,y;
double eps = 1e-8;//精度
scanf("%lf %lf",&x,&y);
if(x - 0 > eps && y - 0 > eps){
printf("1");
}else if(0 - x > eps && y - 0 > eps){
printf("2");
}else if(0 - x > eps && 0 - y > eps){
printf("3");
}else if(x - 0 > eps && 0 - y > eps){
printf("4");
}else{
printf("5");
}
}