I'm trying to build a Linear Equation calculator in C. My source code is below. I know this is a coding question but to explain my issue, I need to explain a little math here. I have the user input the points in the format (x,y) and want to convert the equation into one of the following ways:

1. Slope-intercept -> y = mx + b
2. Standard form -> ax + by = c
3. Point-slope form -> y - y1 = m(x - x1)

y is the point on the y-axis of the coordinate plane, x is the point on the x-axis on the coordinate plane, m is the slope of a line, b is the y-intercept of the first equation, and a, b, and c are variables in the second equation.

My issue is that I'm having trouble finding a way to extract numbers from a coordinate. In my source code, I have a 2 dimensional array that holds 2 strings with a certain size. I don't know if i should use `strtol()` or something else. For example, take the point (34,89). I want to extract the 34 and 89 and plug it in to the values for finding the slope (which would be (y2 - y1) divided by (x2 - x1). So it would be (89 - y) / (34 - x). As for the second point, I want to be able to do the same thing. I would like to avoid making 4 variables for each point if possible. I would also like to avoid asking the user to enter the x value of the first point then the y value of the first point etc. etc. I want to be able to ask the user for a point, including both x and y values. Near the end of the code is unfinshed, so if i have errors, I'll figure them out as I go. The problem is near the beginning and middle.

```
#include <stdio.h>
#include <string.h>
#include <unistd.h>

#define MAXC 56

//void convert_equation(); Function is not defined or used. Uncomment when ready to define
void equation_format();
void print_dots(int n);

char points[2][MAXC];

int main(void) {

    printf("\033[0;32mInitializing Linear Equation Calculator ");
    fflush(stdout);
    print_dots (3);
    putchar('\n');

    printf("\nEnter the 1st point on the line, format (x,y)\n>>> ");
    fflush(stdout);
    fgets(points[0], sizeof points[0], stdin);
    /** trim \n from end of string read with fgets()
     *
     *  use: stringvar[strcspn (stringvar, "\n")] = 0;
     *
     *       strcspn returns the length of stringvar that does NOT include \n
     *       this allows you to simply overwrite the \n with \0 (or plain old 0)
     */
    points[0][strcspn(points[0], "\n")] = 0;

    printf("Enter the 2nd point on the line, format (x,y)\n>>> ");
    fflush(stdout);
    fgets(points[1], sizeof points[1], stdin);
    points[1][strcspn(points[1], "\n")] = 0;

    equation_format();

    return 0;
}

void equation_format() {
    char option;
    while (1) {
        printf("\n\nWhat format would you like the equation in?\n1. Slope-Intercept\n2. Standard Form\n3. Point-slope\n>>> ");
        fgets(&option, 2, stdin);
        switch(option) {
            case(1):{
                int slope, yintercept;
                break;
            }
            case(2):{
                break;
            }

            case(3):{
                break;
            }
            default: {
                printf("Invalid input. Try again");
                print_dots(3);
            }

        }
        break;
    }
}

void print_dots(int n) {
    if (n < 0)
        n = -n;

    while (n--) {
        sleep(1);
        putchar('.');
        fflush(stdout);
    }
}

```

This is a little hard to explain so if I'm not being clear, please tell me. Thank you!