// The function F is a recursive factorial function // that reports when it starts and when it returns. #include int F( int N ); int main() { int m = F(4); cout << m << endl; return( 0 ); } int F( int N ) { cout << "Starting F: " << N << endl; if( N == 1 ) { cout << "Departing F: " << N << ", 1" << endl; return( 1 ); } else { int value = N * F(N-1); cout << "Departing F: " << N << ", " << value << endl; return( value ); } }