fork download
  1. #include <stdio.h>
  2. int main(){
  3. int x1, y1, x2, y2, px, py;
  4. scanf("%d %d %d %d %d %d", &x1, &y1, &x2, &y2, &px, &py);
  5. if(px>x1 && px<x2 && py>y1 && py<y2)
  6. printf("Inside\n");
  7. else if((px==x1 || px==x2) && (py>=y1 && py<=y2) || (py==y1 || py==y2) && (px>=x1 && px<=x2))
  8. printf("On the border\n");
  9. else
  10. printf("Outside\n");
  11. return 0;
  12. }
Success #stdin #stdout 0s 5316KB
stdin
0 0 5 5 5 10
stdout
Outside