Programming Challenge Numbers to Text?
Steve
smorrey at gmail.com
Fri May 5 13:37:34 MDT 2006
Hey that is pretty cool!
On 5/5/06, Jonathan Duncan <jonathan at jkdwebmagic.com> wrote:
> On Fri, 5 May 2006, plug.org at 2nerds.com wrote:
>
> > If this was a competition, and not merely exhibition, :-) lisp's
> > somewhat byzantine "~r" format directive might earn it a shot at
> > the prize:
> >
> > This lisp expression:
> >
> > (format t "~r~%~r~%~r~%~r~%~r~%" 1 15 91283 4918239 2147483647)
> >
> > produces this output:
> >
> > one
> > fifteen
> > ninety-one thousand, two hundred and eighty-three
> > four million, nine hundred and eighteen thousand, two hundred and thirty-nine
> > two billion, one hundred and forty-seven million, four hundred and eighty-three thousand, six hundred and forty-seven
> >
> >
> > (The "~%" format directive is similar to "\n".)
> >
> > :-)
> > Chris
> >
> >
>
> Wow, we found a use for LISP! Actually, that is cool.
>
> Jonathan
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>
More information about the PLUG
mailing list