Recursion

Can I get some sample program codes on Recursion.
Thank U
i
1
2
3
4
nt f (int n)
{if(n<2)return n;
else return f(n-1)+ f(n-2);
}

BTH few would use this to compute Fibonacci numbers because of its inherent inefficiency.
Topic archived. No new replies allowed.