© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

C Graphics Program For Square Animation

#include #include #include #include void main() { int d=2,k=0; int gd=DETECT,gm; initgraph(&gd,&gm,"c:\tc\bgi"); setcolor(2); outtextxy(300,430,"Press any key to continue...."); setcolor(5); setwritemode(1); rectangle(180,120,380,320); getch(); clearviewport(); while(!kbhit()) { d%=91; setcolor(k); rectangle(180+d,120+d,380-d,320-d); delay(40); d+=2; k++; } getch(); }

 
SLogix Student Projects
bottom