if(x_1>x_2

}

x1=x_2

y1=y_2

x2=x_1

y2=y_1

{

float dx=x2-x1

float dy=y2-y1

float steps=abs(dy

if(abs(dx)>abs(dy

steps=abs(dx

float x_inc=(dx\steps

float y_inc=(dy\steps

float x=x1

float y=y1

putpixel(x,y,color

for(int count=0;count<=steps;count

}

x+=x_inc

y+=y_inc

putpixel((int)(x+0.5),(int)(y+0.5).,color

{

{