#include<math.h>
#include<graphics.h>
#include <stdlib.h>
void Initialize(void)
{
int GraphDriver;
int GraphMode;
int ErrorCode;
GraphDriver=DETECT;
initgraph (&GraphDriver,&GraphMode,"");劳动日记300字
ErrorCode=graphresult();
if (ErrorCode!=grOk)
我很忙 { printf("Graphics System Error:%s\n",grapherrormsg(ErrorCode));销售实习日记
exit(1);
}
}
void Brenham(int x1,int y1,int x2,int y2)
{牙齿用英语怎么说
int x,x0,interchange;
int y,y0,temp;
int s1,s2,i;
float e;
int c=14;
x=x1;
y=y1;
x0=abs(x2-x1);
y0=abs(y2-y1);
if ((x2-x1)>0) s1=1;
el s1=-1;
薏米的功效与作用
if ((y2-y1)>0) s2=1;
描述夏天的成语 el s2=-1;
if (y0>x0)
{
temp=x0;
x0=y0;
y0=temp;
茶灯 interchange=1;
}
el interchange=0;
腾讯风铃
e=2*(y0-x0);
for (i=0;i<=x0;i++)
{
putpixel (x,y,c);
while (e>=0)
{
if (interchange==1) x=x+s1;
el y=y+s2;
e=e-2*x0;
}
if(interchange==1) y=y+s2;
el x=x+s1;
e=e+2*y0;
}
}
int main()
{
int x1,x2,y1,y2;
Initialize();
scanf("%d,%d,%d,%d",&x1,&y1,&x2,&y2);
Brenham(x1,y1,x2,y2);
return 0;
}