#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,midx,midy;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
midx=getmaxx()/2;midy=getmaxy()/2;
line(midx,0,midx,2*midy);
line(0,midy,2*midx,midy);
line(midx+150,midy-200,midx+100,midy-100);
line(midx+100,midy-100,midx+200,midy-100);
line(midx+200,midy-100,midx+150,midy-200);
getch();
setcolor(YELLOW);
line(midx-150,midy-200,midx-100,midy-100);
line(midx-100,midy-100,midx-200,midy-100);
line(midx-200,midy-100,midx-150,midy-200);
getch();
setcolor(GREEN);
line(midx+150,midy+200,midx+100,midy+100);
line(midx+100,midy+100,midx+200,midy+100);
line(midx+200,midy+100,midx+150,midy+200);
getch();
closegraph();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.