c - how to break scanf with no enter and no string
<p>I have a project for school and in it, I need to get a four digit number and then continue immediately with no enter. For example: "Enter a number: 1424" and then it just continues, and you can't enter anymore numbers, aw well as Enter key pressing should not be needed.
I tried <code>scanf("%4d",&amp;num);</code> but it waits for Enter key.</p>

<p>And one more restriction is... I can't use strings in this project, so all the solutions must be without strings.</p>