如何检查平面上的4个点是否能定义一个正方形?有一个函数,它接受一个点和正方形面积值作为输入参数,并返回四个边平行于x轴和y轴的正方形(定义相应类型)。以下是我开始的内容:
#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");