fun fact (n) { if n <= 1 then return 1 else return n * fact (n-1) fi } read (n); for i := n, i >= 1, i := i-1 do write (i); write (fact (i)) od