#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) point (x==y) -->"); 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,x,639,x); line(x,0,x,479); putpixel(x,x,10); getche(); setcolor(GREEN); line(2*x-p1.x,2*x-p1.y,2*x-p2.x,2*x-p2.y); getche(); closegraph(); /* Return the system to text mode */ }