 |
| Autor |
Mesaj |
Admin
Administrator

Data inscrierii: 07/Dec/2013
Mesaje: 1103
|
| Citat: |
#include <graphics>
#include <stdlib>
#include <stdio>
#include <conio>
#include <dos>
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
int j,x,y=300;
for(j=0;j<3;j++)
{
for(x=50;x<500;x+=2)
{
setcolor(WHITE);
circle(x,y,20);
delay(10);setcolor(BLACK);
circle(x,y,20);
}
for(;y<460>50;x-=2)
{
setcolor(WHITE);
circle(x,y,20);
delay(10);setcolor(BLACK);
circle(x,y,20);
}
for(;y>300;y-=2)
{
setcolor(WHITE);
circle(x,y,20);
delay(10);setcolor(BLACK);
circle(x,y,20);
}
}
getch();
closegraph();
return 0;
} |
|
|
|
|
|
 |
|
|
|
|
Subiectul urmator
Subiectul anterior
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum |
Powered by phpBB
© 2001, 2002 phpBB Group
|
|