That is what you're trying to do though: make sense of the input according to certain rules. When you're just allowing for one number per line, it is easy to be lax, but if you're trying to interpret a number on a line that may contain other things rather than just considering that to be invalid input, you should be more careful. The thing then is to be absolutely clear as to what are those rules. For example, what about:Originally Posted by Scatman
orCode:three300
orCode:three300zero
Do you allow negative numbers?Code:three 300 five 500
So, depending on what rules you want to use, the exact approach you take to parsing for the number might differ.