Sorry if I don't make much sense, I don't know the English terms of these things.
User inputs the number of N of an N-sided shape and then their points (x,y).
After, I need to create a function that checks if that N-Sided shape is Convex (Curve?) or not.
I have only managed to ask for N and the points so far.
#include <stdio.h>
#include <math.h>
typedef struct point
{
float x;
float y;
} TPoint;
int main( void )
{
TPoint p[20];
float d;
int n, i;
printf("Number of sides ?\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("Point %d (x,y) ?\n",i+1);
scanf("%f", &p[i].x);
scanf("%f", &p[i].y);
}
return 0;
}