Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include<windows.h>
  2. #include<math.h>
  3. #include<graphics.h>
  4. const float pi = 3.14159265359;
  5. using namespace std;
  6. int main()
  7. {
  8. float x= 400,y=400,r=100, t = 0.0;
  9. initwindow(800,600,"");
  10. while(true)
  11. {
  12. cleardevice();
  13. x = r*cos(t) + 150;
  14. y = r*sin(t) + 150;
  15. circle(150,150,120);
  16. circle(x,y,20);
  17. t=t<2*pi?t+0.05:0;
  18. Sleep(10);
  19. }
  20. getch();
  21. closegraph();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement