#include <graphics.h>
#include <math.h>
#include <conio.h>
#include <time.h>
int main() {
initgraph(640, 480);
int n=9;
srand(time(0));
double start=0;
ExMessage m;
int x=320,y=240;
while(1){
while (peekmessage(&m)) {
if(m.message==WM_KEYDOWN){
switch(m.vkcode) {
case VK_LEFT: x -= 10; break;
case VK_RIGHT: x += 10; break;
case VK_UP: y -= 10; break;
case VK_DOWN: y += 10; break;
}
}
}
fillcircle(x, y,25);
pie(x-100, y-100, x+100, y+100,start,start+1);
start+=0.1;
Sleep(50);
cleardevice();
}
getch();
closegraph();
return 0;
}