By not using scanf :p. If scanf is looking for a number, it won't read past any characters, unless they are valid for that type, or a white space. That is, for an unsigned long type, it will skip...