I know its not java related question but I hope you will help me to understand this ....

how it works ??? I know how recursion works but can't understand this one :=-:Code:`void f(int n)`

{ if (n > 0)

{ f(n-2); cout << n << “ “; f(n-1);

}

}

Printable View

- 07-21-2013, 05:03 PMallaudinRecursion
I know its not java related question but I hope you will help me to understand this ....

Code:`void f(int n)`

{ if (n > 0)

{ f(n-2); cout << n << “ “; f(n-1);

}

}

- 07-21-2013, 05:10 PMDarrylBurkeRe: Recursion
- 07-21-2013, 05:59 PMJosAHRe: Recursion