//program to find the quadrants of the coordinates//
#include<stdio.h>
int main()
{
int x,y;
printf("Enter the co-ordinates:");
scanf("%d %d",&x ,&y);
if(x>0&&y>0)
{
printf("Co-ordinates (%d,%d) lies in 1st quadrant",x,y);
}
if(x<0 y="">0)0>
{
printf("Co-ordinates (%d,%d) lies in 2nd quadrant",x,y);
}
if(x<0 p="" y="">0>
{
printf("Co-ordinates (%d,%d) lies in 3rd quadrant",x,y);
}
if(x>0&&y<0 p="">0>
{
printf("Co-ordinates (%d,%d) lies in 4th quadrant",x,y);
}
if(x=0&&y=0)
{
printf("Co-ordinates(%d,%d) lies in origin",x,y);
}
return 0;
}
OUTPUT:


Nice sir
ReplyDeleteThank you
Delete