#include <iostream>                // Ex29
using namespace std;
void g( int i );                // forward declaration with parameter name
void f( int i ) {
    cout << "f(" << i << ")" << endl;
    if ( i > 0 ) g( i - 1 );    // recursion
    cout << "f(" << i << ")" << endl;
}
void g( int i ) {                // check for match with prototype
    cout << "g(" << i << ")" << endl;
    if ( i > 0 ) f( i - 1 );    // recursion
    cout << "g(" << i << ")" << endl;
}
int main () {
    f( 5 );
    cout << endl;
    g( 4 );
}
