help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Error while trying to write numbers in words


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Error while trying to write numbers in words
Date: Thu, 10 Jul 2008 15:22:12 +0200
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

Canol Gokel wrote:
Hello,

I am trying to write a method called "inWords" for Number class to write a
number in words. For example:

15 inWords

should output:

fifteen

I wrote a code, it works for every 2 digit number except 19, for which it
outputs "tennine". I guess there is a logic error in algorithm but I cannot find
it.

No, it's my bug.  I'm sorry. :-(

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]