i think it convert the letter into something numeric
Sort of, when the conversion failed it default initialized the int and set the stream into an error state. Which means it was initialized to zero, which is even.
So what must be the solution
Easy answer, don't try to insert an alpha character into a numeric value.
Harder answer check the state of the stream, if it is in an error state take the appropriate actions. Ie: clear the stream error flag, clear the input buffer, ask the user for a "proper" value.