How to draw circle in c using setcolor
void main()
{
int x1,y1,i,gm,gd=DETECT,j;
initgraph(&gd,&gm,"path");
for(i=0;i<=200;i++)
{
x1=rand()%640;
y1=rand()%480;
for(j=0;j<=25;j++)
{
setcolor(x1%15);
circle(x1,y1,j);
}
delay(5);
}
getch();
}
void main()
{
int x1,y1,i,gm,gd=DETECT,j;
initgraph(&gd,&gm,"path");
for(i=0;i<=200;i++)
{
x1=rand()%640;
y1=rand()%480;
for(j=0;j<=25;j++)
{
setcolor(x1%15);
circle(x1,y1,j);
}
delay(5);
}
getch();
}
0 comments: