Please help me for making bouncing ball in turbo c

Closed
nomansulehari Posts 2 Registration date Thursday September 11, 2014 Status Member Last seen September 13, 2014 - Sep 13, 2014 at 02:44 PM
Ambucias Posts 47356 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 - Sep 13, 2014 at 04:02 PM
#include <graphic.h>
#include <Dos.h>
#include <canio.h>
Int main()
{
Int gd= detect,gm;
Int x,yx,ix,iy;
X=0;
Y=0;
Initgraph(&gd,&gm, "c:\\TC\\BGI");
While(!kbhit())
{
Circle(x,y,10);
x=x+ix;
y=y+iy;
if(y>=get maxy())
iy=iy*-1;
delay(200);
cleardevice();
}
Getch();

This will work in 2 direction down and right i need it in for direction what will i do
Related:

1 response

Ambucias Posts 47356 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 11,170
Sep 13, 2014 at 04:02 PM
Sorry but Kioskea does not provide any homework help.

I suggest that you ask your professor, attend all of your classes and pay attention.

We are not the one who needs a diploma so you must do the work.

Good luck
0