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

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
LVL 1
myaspnetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

myaspnetAuthor Commented:
static void Main(string[] args)
        {
           int input;
           System.Console.Write("Enter Number please : ");
            input = int.Parse(System.Console.ReadLine());
            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;
        }
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽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
0
myaspnetAuthor Commented:
ok
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.