DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Finding Nth Fibonacci number in Recursive way - C#
public int FindNthFibonacciNumber(int n)
{
if (n == 1 || n == 2) return 1;
int nthfibonacciNumber = FindNthFibonacciNumber(n - 1) + FindNthFibonacciNumber(n - 2);
return nthfibonacciNumber;
}
Finding Nth Fibonacci number in Recursive way - C#




