[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [Solution] [QUIZ] Roman Numerals (#22

Peña, Botp

3/7/2005 10:26:00 AM

Brian Schröder [mailto:ruby.brian@gmail.com] wrote:

//Then we will come to the core. I implemented integer to roman
//as a recursive process, where in each iteration the biggest

// def roman
// return "-#{(-self).roman}" if self < 0
// return "" if self == 0
// @@roman_values_assoc.each do | (i, v) |
//return(i+(self-v).roman) if v <= self end
// end

clever. thanks for the tip.
-botp