//Defines gotoxy() for ANSI C compilers. void gotoxy(short x, short y) { COORD pos = {x, y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); }