function Factorial(%num) { if(%num < 2) return 1; for(%a = %num-1; %a > 1; %a--) %num *= %a; return %num; }