"Guess the Number" in C
void main is a really bad habit. It must be int main.

Always check what scanf returns. For example, try to enter a non-numeric input, and see your program entering the infinite loop.

Avoid conio.h (and hence getch). It is very non-portable.