Fibonacci Sequence Generator
Generate the Fibonacci sequence for the specified amount of numbers, using a C function.
|
On Thursday, April 24th 2008 at 08:20 PM By Andrei Pociu (View Profile)
    (Rated 0 with 0 votes) |
Contextual Ads
More C Resources
Advertisement
int Fibonacci(int n)
{
int numA = 1, numB = 1, numC, i;
for (i = 3; i <= n; i++)
{
numC = numB;
numB += numA;
numA = numC;
}
return numB;
}
|
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|
Rate this code snippet
Current Comments
There are no comments.
|
Related Source Code
There is no related code.
Related Tutorials
There are no related tutorials.
C Job Search
|