I\'m writing a program in C compiled in gcc. The question relates to homework, but the specific part I need help with is not part of the homework assignment. A similar que
If I get your question, please try this:
system("cls");
and print a new text on the console.
EDIT:
Also, to answer your second question, have a while loop and:
use getch() found in conio.h
So that you need not wait for the enter key to be pressed as in the scanf.
Use the \b
(backspace) character.
printf("Quick brown fox");
int i;
for(i=0; i < 9; i++)
{
printf("\b");
}
printf("green fox\n");
I noticed that putting a \n
on the first printf()
messed up the output.
Doing those console manipulations is dependent on the platform that you are using. You will probably need a library to accomplish what you are trying to do. See something like this which is cross platform, or the old conio library for DOS if you're on Windows.