Advertisement
GerexD

smile valtakozo

Jan 14th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include <iostream>
  2. #include <graphics.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int gdriver=DETECT, gmode;
  11. initgraph(&gdriver, &gmode, "");
  12. srand(time(NULL));
  13. int x=getmaxx()/2,y=getmaxy()/2;
  14. int r=getmaxy()/3;
  15. setcolor(14);
  16. circle(x,y,r);
  17. arc(x, y, 210,330,getmaxy()/4);
  18. int a,b;
  19. a=x*2/2.5;
  20. b=y*2/2.5;
  21. circle(a,b,30);
  22. a=getmaxx()-a;
  23. circle(a,b,30);
  24. Sleep(1000);
  25. for(int i=1;i<=100000;i++)
  26. {
  27. y=getmaxy()/2;
  28. setcolor(14);
  29. arc(x, y, 210,330,getmaxy()/4);
  30. Sleep(1000);
  31. setcolor(BLACK);
  32. arc(x,y,210,330,getmaxy()/4);
  33. y=getmaxy()-getmaxy();
  34. setcolor(14);
  35. arc(x,y+370, 30, 150, getmaxy()/4);
  36. Sleep(1000);
  37. setcolor(BLACK);
  38. arc(x,y+370 ,30,150,getmaxy()/4);
  39. }
  40. getch();
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement