#include #include #include #include void main() { int GraphDriver; /* The Graphics device driver */ int GraphMode; /* The Graphics mode value */ int w,h; struct point { int x,y; } p1,p2; printf("give me the first point--->"); scanf("%d %d",&p1.x,&p1.y); printf("give me the second point--->"); scanf("%d %d",&p2.x,&p2.y); printf("(%d,%d) to (%d,%d)\n",p1.x,p1.y,p2.x,p2.y); getche(); GraphDriver = DETECT; /* Request auto-detection */ initgraph( &GraphDriver, &GraphMode, "" ); setcolor(14); line(p1.x,p1.y,p2.x,p2.y); getche(); closegraph(); /* Return the system to text mode */ }