In mathematics, the factorial of a positive integer n,[1] denoted by n!, is the product of all positive integers less than or equal to n. For example,
5! = 1 x 2 x 3 x 4 x 5 = 120
here is some pseudo code for iterative and recursive factorial code:
function factorial( input ) { j=1; for (i=1; i<=input; i++) { j=j*i; } return j; }
function factorial( input ) { if ( input <= 1 ) return 1; else return input * factorial( input -1 ); }