getchar and scanf do not agree with one another. Use one, or the other, but never both. In this case, getchar grabs the return key pressed after the previous input and uses that, instead of waiting for a letter.