So I've managed to make the countdown clock in which changes the console text only by flushing out the line using "\r"
end = 120;
for (end; end >=0; end--){
printf("\r");
int num = end / 60;
int nums = end % 60;
printf(" %d : %.2d ", num, nums);
sleep(1);
if(num == 0 && nums == 0){
printf("\n\nTIME'S UP! GAMEOVER!");
sleep(2);
}
}
However when I do this I can't use any input, obviously having "scanf" would interupt the flow of the time loop... is there any other way I could get a dynamic changing text in the console while inputting other text?