- Arrays, Coordinate Geometry, Geometric, Mathematical

Count number of coordinates from an array satisfying the given conditions

  #include using namespace std;  int centralPoints(int arr[][2], int N){        int count = 0;              int c1, c2, c3, c4;          for (int i = 0; i < N; i++) {                                  c1 = 0, c2 = 0, c3 = 0;        c4 = 0;                  int x = arr[i][0];        int y = arr[i][1];                                  for (int j = 0; j < N; j++) {                                      if (arr[j][0] > x                && arr[j][1] == y) {                c1 = 1;            }                                      if (arr[j][1] > y                && arr[j][0] == x) {                c2 = 1;            }                                      if (arr[j][0] < x                && arr[j][1] == y) {                c3 = 1;            }                                      if (arr[j][1] < y                && arr[j][0] == x) {                c4 = 1;            }        }                          if (c1 + c2 + c3 + c4 == 4) {                          count++;        }    }          return count;}  int main(){    int arr[4][2] = { { 1, 0 }, { 2, 0 },                       { 1, 1 }, { 1, -1 } };    int N = sizeof(arr) / sizeof(arr[0]);    cout