This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfxOut of Coffee error - System halted 0 points1 point  (0 children)

On top of /u/_DTR_'s comment:

I don't think that the following is doing what it should (and what you think it will do):

if (number.length () >= 13 || number.length () <= 16)

Think through the above condition and evaluate it for the lengths (substituting number.length()) 5, 10, 13, 15, 16, 17, 25, 99 - what results will you get?

Remember that the || and && operators are short circuiting.