// PROGRAM NAME // // Written INSERT-DATE-HERE // By INSERT-AUTHOR-HERE // // INSERT-DESCRIPTION-HERE // #include #define MAX_POINTS 10 struct point { // TODO: fill this in so that the struct can hold an x and y position // // i.e. This struct should contain: // the x-coordinate and y-coordinate (doubles). }; // Prints a point out. void print_point(int point_no, double x, double y); int main(void) { // TODO: Declare an array of points of size MAX_POINTS printf("How many points in the shape? "); // TODO: scan in number of points in the shape printf("Enter points:\n"); // TODO: scan in the details of each point into the array printf("\nShape Points:\n"); // TODO: print all the points return 0; } // Prints a single point in the correct format. // // Parameters: // - `point_no` -- The point number // - `x` -- The x-coordinate of the point // - `y` -- The y-coordinate of the point // // Returns: nothing. void print_point(int point_no, double x, double y) { printf("%2d: x = %.3lf, y = %.3lf\n", point_no, x, y); }