Created
July 27, 2010 08:06
-
-
Save trinary/491925 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def addchars(target) | |
str = "" | |
while target > 9 | |
c = rand(9) | |
str << c.to_s | |
target -= c | |
end | |
str << target.to_s | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment