|
have a test:
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
int main ()
{
int gdriver, gmode, i;
gdriver = DETECT;
initgraph (&gdriver,&gmode, ""); / * Graph initialization * /
setbkcolor (2); / * Set the graphics background * /
getch ();
cleardevice ();
getch ();
for (i = 0; i <= 15; i ++)
{
setcolor (i); / * Set different drawing colors * /
circle (320, 240, 20 + i * 10); / * Draw circles with different radii * /
delay (100); / * Delay 100 ms * /
}
for (i = 0; i <= 15; i ++)
{
setbkcolor (i); / * Set different background colors * /
cleardevice ();
circle (320, 240, 20 + i * 10);
delay (100);
}
getch ();
closegraph ();
return 0;
} |
|