I am trying to get the used to type in a number and when they press a key other then an integer, the program will assign that number to the age. However, for some reason the break command doesn't seem to be working. I also tried to make it incremental and that didn't work either.
I have tested your program without any change except adding few lines to blink L. Your program assigns correct value A/B/C/D/*/# to the variable age as you have wanted in your original post -- "when they press a key other then an integer, the program will assign that number to the age.". The break statement also works well.
@sterretje
I have tried/tested your codes; unfortunately, it does not show any result (except the message Age:) on the Serial Monitor. When the key A/B/C/D/*/# is pressed down, the break statement takes place.