Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<windows.h>
- #include<math.h>
- #include<graphics.h>
- const float pi = 3.14159265359;
- using namespace std;
- int main()
- {
- float x= 400,y=400,r=100, t = 0.0;
- initwindow(800,600,"");
- while(true)
- {
- cleardevice();
- x = r*cos(t) + 150;
- y = r*sin(t) + 150;
- circle(150,150,120);
- circle(x,y,20);
- t=t<2*pi?t+0.05:0;
- Sleep(10);
- }
- getch();
- closegraph();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement