Center of a line (when one end coordinates and length is given) program in c

Let’s have a look at the Center of a line Program in C Programming language.

int main()
    int i,j,k;
    printf("Enter the x-coordinate of the vertex\n");
    printf("Enter the y-coordinate of the vertex\n");
    printf("Enter the length of a side\n");
    printf("The centre of line is at (%d,%d)",(i+(k/2)),(j+(k/2)));
    return 0;

Leave a Comment

Your email address will not be published. Required fields are marked *