Fact

Ruby code posted by Red
created at 06 Sep 14:18

Edit | Back
1
2
3
4
5
6
7
def fact(n)
(n-1).downto(1) {|x|
n *= x;
}
n;
end
fact(5)
63 Bytes in 1 ms with coderay