how to check if 4 points in a plane define a square? that the function that sets the point and the square area value as input parameters returns four squares (determine the corresponding type) with sides parallel to the x axis and y axis
this is how i start:
#include <stdio.h>
#include<math.h>
struct point{
float x;
float y;
}
typedef struct point POINT;
struct square{
struct point p1;
struct point p2;
struct point p3;
struct point p4;
}
typedef struct square SQUARE;
int main()
{
int point;
printf("point coordinate");
printf("\n\n");
printf("enter data\n");
source
share