int x=300,y=160,r=40;
clrscr();
gdriver=9; gmode=1;
initgraph(&gdriver,&gmode,"a:\\");/*需要说明的是,第三个参数a:\\是egavga.bgi这个文件的路径*/ /* install the graphic device.the third parameter is the path of the driver*/
setbkcolor(0);
setcolor(WHITE);
while(1)
{
circle(x,y,r);/*paintthecircle*/
line(x,y+r-10,x,y+r-12);
line(x+r-4,y,x+r,y);
line(x-r,y,x-r+4,y);
line(x,y-r+10,x,y-r+10+2); /* draw the fout scales */
gettime(&t);
sprintf(s,"The current time is %2d:%02d:%02d\n",t.ti_hour,t.ti_min,t.ti_sec,t);
outtextxy(0,0,s); /* out put the current time */