Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <stdbool.h>
- int main()
- {
- float x,y;
- bool condition;
- printf("Enter x y\n");
- scanf("%f %f",&x, &y);
- condition=(x>0 && y>0 && y<=-1*x+1);
- if (condition) printf ("Exist in first quarter\n");
- else printf ("Don't exist in first quarter\n");
- condition=(x<0 && y>0);
- if (condition) printf ("Don't exist in second quarter\n");
- else printf ("Don't exist in second quarter\n");
- condition=(x<0 && y<0 && ((x*x)+(y*y))<=1);
- if (condition) printf ("Exist in third quarter\n");
- else printf ("Don't exist in third quarter\n");
- condition=(x>0 && y<0 && y>=x-2 && ((x*x)+(y*y))>=1);
- if (condition) printf ("Exist in fourth quarter\n");
- else printf ("Don't exist in fourth quarter\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement