150. 第幾象限
user_6817964
c_cpp
3 years ago
496 B
3
Indexable
typedef struct point_t point_t; struct point_t { double x; double y; }; int main() { point_t xy; scanf("%lf", &xy.x); scanf("%lf", &xy.y); if (xy.x > 0) { if (xy.y > 0) { printf("第一象限"); } else { printf("第四象限"); } } else { if (xy.y > 0) { printf("第二象限"); } else { printf("第三象限"); } } }
Editor is loading...