Few Questions immediately pop up.If you get answer to these,you can yourself fix the problem:
#include<windows.h>void gotoxy(int x, int y){ COORD c; c.X = x-1; c.Y = y-1; SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), c);}