Skip to content

Instantly share code, notes, and snippets.

@trinary
Created July 27, 2010 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trinary/491925 to your computer and use it in GitHub Desktop.
Save trinary/491925 to your computer and use it in GitHub Desktop.
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