Hi guys. I need to create a progam with struct of 4 points that define a square (and something more - that's why there are 3 structs, not one). The goal of the program is to check wheter those points form a real square.
Is it a good start?Code:#include <stdio.h>
#include <math.h>
void write();
typedef struct point
{
int x;
int y;
}
typedef struct square
{
point point1;
point point2;
point point3;
point point4;
}
typedef struct segment
{
point point5;
point point6;
}
int main() {
void write() {
printf("Enter x:\n");
scanf("%d", x);