User:Helenchittooparambil/sandbox

BALL BOUNCING PROGRAM USING C
void main { int gd=DETECT,gm; int x=0;y=0,i=0,flag=0; initgraph(&gd,&gm,"e:/Tc/BGI"); while(x<=getmax) { setcolor(RED); setfillstyle(SOLID_FILL,RED); circle(x,y,30); floodfill(x,y,RED); if(i%5==0) { x=x+3; i=0; } if(flag){ y=y-10; } else y=y+10; } if(y>=getmaxy) { flaf=1; } else if { flag=0; } delay(50); i++; } getch; }