Category: Coordinate Geometry

Equation of a straight line passing through a point and making a given angle with a given line

#include using namespace std;  double line_slope(double a, double b){    if (a != 0)        return -b / a;                  else        return (-2);}  void line_equation(double a, double b,                   double c, double x1,                   double y1, double alfa){        cout

Continue Reading

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) […]

Continue Reading