Using getch() instead of getchar() is a really bad idea, because getch() is a non-standard function.

The issue here is that you're mixing formatted-input functions (scanf()) with character-based...