Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created December 30, 2009 14:58
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 Riduidel/266104 to your computer and use it in GitHub Desktop.
Save Riduidel/266104 to your computer and use it in GitHub Desktop.
def extendCoefs(_c)
returned = []
p = 0
c = 0
_c.each_index do |index|
c = _c[index]
returned[index] = c+p
p=c
end
returned<<1
returned
end
@coefs = \[\]
while(@coefs.length<34)
@coefs = extendCoefs(@coefs)
puts @coefs.join(" ")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment