Code:
#include <graphics.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
int gd = DETECT, gm = DETECT, s, dx, dy, m, x1, y1, x2, y2;
float xi, yi, x, y;
clrscr();
printf("Enter the sarting point x1 & y1\n");
scanf("%d%d", &x1, &y1);
printf("Enter