Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- float A, B, C;
- float x, y;
- A = -4;
- B = 5;
- C = 6;
- printf("Enter X Y -> ");
- scanf("%f%f", &x, &y);
- if(x/A+y/B < 1 && x < 0 && y > 0) // находится ли точка в области B
- printf("Your point in B zone");
- else
- if(x/A+y/B > 1 && x < 0 && y < 0) // находится ли точка в области A
- printf("Your point in A zone");
- else
- if(x/C+y/B < 1 && x >0 && y < 0) // находится ли точка в области C
- printf("Your point in C zone");
- else
- printf("Your point not in zone"); // точка не воходит ни в одну их обласлей
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement