# how calculate this method Fn = Fn-1 + Fn-2

on
how calc  Recursion method that takes an integer value and returns the summation of all numbers
Fn = Fn-1 + Fn-2
For example: F(10) = 0,1,1,2,3,5,8,13,21,34
Summation = 88
Comment
Watch Question

Do more with

EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
static void Main(string[] args)
{
int input;
int R=fibonacci(input)-1;
System.Console.WriteLine(R.ToString());

}
public static int fibonacci(int N)
{
if (N < 2)
return 1;
int Result;
Result = fibonacci(N - 1) + fibonacci(N - 2);
return Result;
}
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

Commented:
I see that you made a new question for your homework problem. You do realize it is not permissible for us to do your homework for you, right?

Since you apparently don't understand what recursion is, why don't you ask that instead of asking us to do your work for you?

http://www.cprogramming.com/tutorial/lesson16.html

Commented:
ok

Do more with