A simple algorithm to recognize 0-9.