i want to accept input that is just 0+
but when i type a letter example a the code continue and proceed to the next statement which suppose to proceed to the else statement i made.
The problem occurs because you are inputting a char into an int. You first if statement simply compares it to zero and nineteen but does nothing to check the type. To see if the inputted type is correct you need to see if cin has failed using cin.fail().