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.
#include<stdio.h> int main() { int i,j,k; printf("Enter the x-coordinate of the vertex\n"); scanf("%d",&i); printf("Enter the y-coordinate of the vertex\n"); scanf("%d",&j); printf("Enter the length of a side\n"); scanf("%d",&k); printf("The centre of line is at (%d,%d)",(i+(k/2)),(j+(k/2))); return 0; }