#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 y; 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 axis ( y=? )-->"); scanf("%d",&y); 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,y,p2.x,y); getche(); /* x-axis */ setcolor(GREEN); line(p1.x,2*y-p1.y,p2.x,2*y-p2.y); getche(); closegraph(); /* Return the system to text mode */ }