c++ exercise to convert written-out numbers into arabic digits