可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following code : #include<stdio.h> #include<conio.h> #include<math.h> #include<graphics.h> void main() { int gd=DETECT,gm; int dx,dy,p,end; float x1,x2,y1,y2,x,y; initgraph(&gd,&gm,""); printf("\nEnter the value of x1: "); scanf("%f",&x1); printf("\nEnter the value of y1: "); scanf("%f",&y1); printf("\nEnter the value of x2: "); scanf("%f",&x2); printf("\nEnter the value of y2: "); scanf("%f",&y2); dx=abs(x1-x2); dy=abs(y2-y1); p=2*dy-dx; if(x1>x2) { x=x2; y=y2; end=x1; } else { x=x1; y=y1; end=x2; } putpixel(x,y,10); while(x<end)