Does your use of conio.h indicate you're using TurboC, or some other DOS-era compiler?

Second, you need to learn about indentation. Pick a style you like and stick to it. An indent style of "left" isn't going to work out for you, nor anybody that would care to help you.

Third, in order to implement what you ask, you need some kind of non-blocking I/O, which in turn means you need to tell us which OS/Compiler you're using. Standard C doesn't do non-blocking input.