Skip to content

Instantly share code, notes, and snippets.

@neuling
Created August 25, 2013 11:32
Show Gist options
  • Save neuling/6333390 to your computer and use it in GitHub Desktop.
Save neuling/6333390 to your computer and use it in GitHub Desktop.
<script>n=prompt().split("");e=eval;c="q=n[0];w=n[1];r[x=n.join('')*1]||e(y[(x+'').length])";t="tausend";h="hundert";j='zig';y=[,"r[q]","w==0?r[q]+j:(q==1?r[w]+r[10]:r[w]+'und'+(i[q]||r[q]+j))","n.shift();r[q]+h+e(c)","n=n.slice(-3);r[q]+t+e(c)","k=n.splice(2);u=e(c);n=k;u+t+e(c)","e(y[5].replace(2,3))"];r=" ein zwei drei vier fuenf sechs sieben acht neun zehn elf zwölf".split(" ");r[20]="zwanzig";r[30]="dreißig";i=[,,r[20],r[30]];alert(e(c).replace(/(en|s)z/,'z').replace(/(^ein$)|(ein$)/,'eins'));</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment