title: Code Golf: Number to Words
body: <p>The code golf series seem to be fairly popular.  I ran across some code that converts a number to its word representation.  Some examples would be (powers of 2 for programming fun):</p>
  
  <ul>
  <li>2 -> Two</li>
  <li>1024 -> One Thousand Twenty Four</li>
  <li>1048576 -> One Million Forty Eight Thousand Five Hundred Seventy Six</li>
  </ul>
  
  <p>The algorithm my co-worker came up was almost two hundred lines long.  Seems like there would be a more concise way to do it.</p>
  
  <p>Current guidelines:</p>
  
  <ul>
  <li>Submissions in any <strong>programming</strong> language welcome (I apologize to
  PhiLho for the initial lack of clarity on this one)</li>
  <li>Max input of 2^64 (see following link for words, thanks mmeyers)</li>
  <li><a href="http://en.wikipedia.org/wiki/Long_and_short_scales" rel="nofollow noreferrer">Short scale</a> with English output preferred, but any algorithm is welcome.  Just comment along with the programming language as to the method used.</li>
  </ul>