#include<stdio.h>
int main(){
	int x, y;
	printf("Enter x-coordinate:\n");
	scanf("%d", &x);
	printf("Enter y-coordinate:\n");
	scanf("%d", &y);
	if(x==0 && y== 0){
		printf("(%d, %d) is the origin", x,y);
	}
	else if(x != 0 && y==0){
		printf("(%d, %d) is on the x-axis", x,y);
	}
	else if(x == 0 && y !=0){
		printf("(%d, %d) is on the y-axis", x,y);
	}
	else if(x > 0 && y>0){
		printf("(%d, %d) is in the first quadrant", x,y);
	}
	else if(x < 0 && y>0){
		printf("(%d, %d) is in the second quadrant", x,y);
	}
	else if(x > 0 && y<0){
		printf("(%d, %d) is in the fourth quadrant", x,y);
	}
	else if(x < 0 && y<0){
		printf("(%d, %d) is in the third  quadrant", x,y);
	}
}
Comments