Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
C Program to accept two integers for a co-ordinate point and determine its Quadrant.
* You can use all the programs on
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact
* To find more C programs, do visit
* and browse!
* Happy Coding
int main()
int x,y;
printf("Enter the values for coordinates x and y\n");
if((x>=0) &&(y>=0))
printf("\n The co-ordinate (%d,%d) is in first Quardrant\n",x,y);
else if((x<0) &&(y<0))
printf("\n The co-ordinate (%d,%d) is in Third Quardrant\n",x,y);
else if((x>0) &&(y<0))
printf("\n The co-ordinate (%d,%d) is in Fourth Quardrant\n",x,y);
else {
printf("\n The co-ordinate (%d,%d) is in Second Quardrant\n",x,y);
return 0;
/* Author: Sandeepa Nadahalli */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment