#include using namespace std ; int factorial(int number) { int result ; if ( number == 0 || number == 1 ) return 1 ; result = number * factorial( number - 1 ) ; return result ; } int factorialIterative(int number) { int result = 1 ; if( number == 0 ) return 1 ; for( int i1=1 ; i1<=number ; i1++ ) result = result*i1 ; return result ; } int main() { cout << factorial( 4 ) << endl ; cout << factorialIterative( 4 ) << endl ; }