I created a program that displays simple mathematical questions. (Ex. 1+1=?)
Now, I want to make it real time. As for example, each question must be answered for five seconds only. Otherwise, the program will proceed to the next question.
Is there any way to do this?
Then I say don't bother, you'll end up just creating a "hackish" code thats not worth it. What you are look at is event based programming (e.g. listening for multiple events). Console programming was just made for getting familiar with the syntax, its not for event listening.