You are here

getx and gety gunction in c

Declarations :-
int getx();
int gety();

getx function returns the X coordinate of current position.
gety function returns the Y coordinate of current position.

Example Program of getx and gety functions :


int main()
	int gd = DETECT, gm;
	int x, y;
	char a[100];


	moveto(200 + random(100),100 + random(100));

	circle(getx(), gety(), 50);

	return 0;

Note: Current Position is sometimes written as CP in short.