|There isn't really any standard way to manipulate the console as the functions are mostly compiler specific. What compiler are you using?|
If you're lucky, you might be able to use windows.h - here's a link to a broad example that covers a lot of console functions.
Look for the SetConsoleCursorPosition function.
My work in progress. I hate JS. :P