SHARE
TWEET

Untitled

a guest Mar 20th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top