i can trap Number only but i cant trap letter inputs. how to do that? please?
Enter a letter: 5
"INVALID INPUT! PLEASE ENTER A NUMBER!"
if you want us to see where you're going wrong in your code, you'll have to show us your code, not what you get on your DOS prompt.
for instance, if you've coded it to generate an error message as soon as you enter '5', then your code is working perfectly fine, but impossible for us to know.
Since we also can't see what you're using to read the char, are you sure he's not taking the blank space that stands before the 5?
depending on your code, that might give a problem as well.
but most important is: what exactly do you need? do you need to read characters, or will you, on some point, have to read input that contains more than one char?