View Problem

Perform an action a fixed number of times with a counter

Display the string "10 .. 9 .. 8 .. 7 .. 6 .. 5 .. 4 .. 3 .. 2 .. 1 .. Liftoff!"
DiskEdit
ruby
10.downto(1) { |n| print n, " .. " }
puts "Liftoff!"
DiskEdit
clojure
(dotimes [i 10]
(print (str (- 10 i) " .. ")))

(println "Liftoff!")
ExpandDiskEdit
erlang
fromto(10, 1, -1, fun (X) -> io:format("~B .. ", [X]) end), io:format("Liftoff!~n").
ExpandDiskEdit
erlang
lists:foreach(fun (X) -> io:format("~B .. ", [X]) end, lists:seq(10, 1, -1)), io:format("Liftoff!~n").

Submit a new solution for ruby, clojure, or erlang
There are 18 other solutions in additional languages (cpp, csharp, fantom, fsharp ...)