How can I write a loop in Ruby that counts down, similar to the following C-style for loop?
for
for (i = 25; i >= 0; i--) { print i; }
One way:
25.downto(0) do |i| puts i end