Factorial iterative and recursive.
Anonymous
Iterative fact = 1; int n = 1; int i=0; for(i=1;i<=n;i++) fact *= i; Recursive int GetFactorial(int n) { if ( n==0 ) return 1; return GetFactorial(n-1)*n; }
Check out your Company Bowl for anonymous work chats.