Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
___________________________________________________________________
But yeah, there are numerous snippets and such for that.
One word of advice though.
DON'T USE RECURSION FOR THE FIBONACCI SEQUENCE UNLESS YOU ARE INSTRUCTED TO DO SO...The reason I say this is because it has 2 recursive calls in each respective call. The execution time increases
EXPONENTIALLY. I believe the time it takes to find the 50th number in the sequence takes about 20 minutes if I remember rightly, but it's been a while since that chapter in my class. I DO remember though, that it's EXTREMELY discouraged to use recursion for finding these numbers.
This post has been edited by Locke37: 11 Jun, 2008 - 07:04 PM