#include "graphics.h"
main()
{
int driver=VGA,model=VGAHI;
int i=0,j=0;
int x,y;
initgraph(&driver,&model,"");
ege::initgraph(300,300);
setbkcolor(BLACK);
setcolor(WHITE);
setfillstyle(SOLID_FILL,WHITE);
for(j=0; j<3; j++)
{
for(i=0; i<3; i++)
{
if(j%2==0 && i%2==0)
{
bar(100*i,j*100,100*i+100,j*100+100);
}
if(j%2==1 && i%2==1)
{
bar(100*i,j*100,100*i+100,j*100+100);
}
}
}
for ( ; is_run(); delay_fps(120))
{
while (mousemsg())
{
mouse_msg m = getmouse();
if (m.msg == mouse_msg_down)
{
x=m.x/100;
y=m.y/100;
setcolor(RED);
setfillstyle(SOLID_FILL,RED);
sector(x*100+100/2,y*100+100/2,0,360,50,50);
}
}
}
}