Here is my fib() function:
I've been working on this for a couple of hours now, but I can't get it correctly calculate the numbers. A little help?
Thank you all for your input ::cue rimshot:: !
Code:
int fib (int x)
{ int i, count=0;
if (x==1 || x==2) return 1;
for (i=0; i < x; i++)
{
count = (x-1) + (x-2);
}
return count;
}
Thank you all for your input ::cue rimshot:: !