I'm doing a counter where I'm showing how many seconds the user has to make the input. The problem is that when I use scanf(), the program will stop and will wait for the answer, but I don't want that. I'd like to keep running the counter even thought the user doesn't put anything.
Example:
for(int i=10;i>=0;i--){
i==0? printf("time over\n"):printf("%d seconds left\n",i);
scanf("%s", decision);
sleep(1);
}
What can i do to solve this?