you could use clrscr(); after using the kbhit() loop