#include #include #include #include void main() { int GraphDriver; /* The Graphics device driver */ int GraphMode; /* The Graphics mode value */ struct viewporttype vp; struct point { int x,y; } p1,p2; int x; 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("give me the reflex x=y axis -->"); scanf("%d",&x); getche(); GraphDriver = DETECT; /* Request auto-detection */ initgraph( &GraphDriver, &GraphMode, "" ); setcolor(YELLOW); line(p1.x,p1.y,p2.x,p2.y); getche(); setcolor(CYAN); line(0,0,x,x); getche(); setcolor(GREEN); line(p1.y,p1.x,p2.y,p2.x); getche(); closegraph(); /* Return the system to text mode */ }