How would you write a non-recursive algorithm to compute n!?
n!
in pseudocode
ans = 1 for i = n down to 2 ans = ans * i next