#include #include using namespace std; main() { initwindow(800,600); int x=100; int xt=150, yt=150; int a=10, b=10; char ch; while(1) { setcolor(15); circle(xt,yt,10); xt+=a; yt+=b; rectangle(x,550,x+80,570); delay(100); setcolor(0); rectangle(x,550,x+80,570); if( kbhit() ) // اگر دکمه ای زده شد ch=getch(); // ایراد دارد .. صبر می کنه if(ch=='d') x+=20; if(ch=='a') x-=20; ch=' '; } getch(); }