On Thu, 4 May 2006, Troy Bowman wrote: > I suck at C, but here's a stab at it... > > [EMAIL PROTECTED]:~$ ./count 1 15 100 393 1938 91283 4918239 2147483647 > 1: one > 15: fifteen > 100: one hundred > 393: three hundred ninety-three > 1938: one thousand nine hundred thirty-eight > 91283: ninety-one thousand two hundred eighty-three > 4918239: four million nine hundred eighteen thousand two hundred thirty-nine > 2147483647: two billion one hundred forty-seven million four hundred > eighty-three thousand six hundred forty-seven
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 /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
