100 by shinh

a=%w(twen thir for fif six seven eigh nine zero one two three four five six seven eight nine ten eleven twelve)
?e.times{|i|puts i>99?'one hundred':a[i+8]||(i<20?a[i==14?12:i-12]+'teen':a[i/10-2]+"ty#{i%10<1?'':' '+a[i%10+8]}")}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page