#Include #Include
#Include #Include
h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void check(x)
x=x+0.5;
void main()
int a=DETECT,b,x0,y0,x1,y1,i,steps;
float xin,yin;
float dx,dy;
float xf,yf;
scanf("%d",&x0);
scanf("%d",&y0);
scanf("%d",&x1);
scanf("%d",&y1);
initgraph(&a,&b,"C:\\TURBOC3\\BGI");
dx=x1-x0;
dy=y1-y0;
if(abs(dx)>abs(dy))
steps=abs(dx);
}
else
steps=abs(dy);
xin=dx/(float)steps;
yin=dy/(float)steps;
xf = x0;
yf = y0;
clrscr();
putpixel(xf,yf,YELLOW);
for(i=0;i<steps;i++)
xf=xf+xin;
yf=yf+yin;
check(xf);
check(yf);
putpixel(xf,yf,YELLOW);
getch();