count down by angel.white

def rec(n)\x0d
  if n.size==1\x0d
    n=n.to_i\x0d
    while n>=0\x0d
      puts n\x0d
      n-=1\x0d
    end\x0d
    return\x0d
  end\x0d
  \x0d
  while n[0]>48\x0d
    puts n\x0d
    n[0]-=1\x0d
  end\x0d
  n[1]=57\x0d
  n=n.to_i.to_s\x0d
  rec(n)\x0d
end\x0d
\x0d
\x0d
rec(gets)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page