Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <graphics.h>
- #include <stdlib.h>
- #include <time.h>
- using namespace std;
- int main()
- {
- int gdriver=DETECT, gmode;
- initgraph(&gdriver, &gmode, "");
- srand(time(NULL));
- int x=getmaxx()/2,y=getmaxy()/2;
- int r=getmaxy()/3;
- setcolor(14);
- circle(x,y,r);
- arc(x, y, 210,330,getmaxy()/4);
- int a,b;
- a=x*2/2.5;
- b=y*2/2.5;
- circle(a,b,30);
- a=getmaxx()-a;
- circle(a,b,30);
- Sleep(1000);
- for(int i=1;i<=100000;i++)
- {
- y=getmaxy()/2;
- setcolor(14);
- arc(x, y, 210,330,getmaxy()/4);
- Sleep(1000);
- setcolor(BLACK);
- arc(x,y,210,330,getmaxy()/4);
- y=getmaxy()-getmaxy();
- setcolor(14);
- arc(x,y+370, 30, 150, getmaxy()/4);
- Sleep(1000);
- setcolor(BLACK);
- arc(x,y+370 ,30,150,getmaxy()/4);
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement