I have a small program that which is confusing me. I am trying using a loop to take input from user. In case input is wrong, it is repeated again but if it is right, it exits.
First of all, # include and use getc(stdin) to get a character. It'll help you to prevent cursor from moving and putting unnecessary characters to console.
Secondly, write the welcome message before the loop.