So you ask a simple question and your solution is poorly designed. you have no correct input checking and you use printf when you shouldn't. You get a "C", but I am no teacher.

... try typing "a".. congratulations it loops for life!