
large Fibonacci numbers
I'm trying to calculate the largest Fib. number less than 100 digits long using the general formula: F(n) = F(n1)+F(n2). Need to store it in an array one digit per cell. I checked through the search option and I found one really relevant post. But this post is talking about a large number read from a file... I need to calculate it! I'm trying to gather my thoughts first, and my question is whether to conduct the calculation using digits as strings, just like I would read it from a file??? I am kind of lost how to start. Any hints how to start thinking about it?
Thanks.

Well, a quick calculation yields 83108245990870293529395578470112099370436902820065 1613859972830080739980541065544674812034151699525. :D
Step 1: Make a char or int array with 100 elements where each element is a digit, initialise it to one. eg. a[99] = 1;
Step 2: Make a second char or int array with 100 elements where each element is a digit, initialise it to one. eg. b[99] = 1;
Step 3: Make a third char or int array (c), and add a to b using manual arithmetic you learned in elementary school and store it in c.
Step 4: assign (copy) b to a, then assign c to b.
Step 5: go back to step 3 the desired number of times.

Oh, you mean like I would be adding two binary numbers with carryon, but in the decimal system? OK, thanks, that's what was missing... :) So simple. Thanks.

Or, best of all, use this:
Code:
struct digit {
unsigned n : 10; /* 1024 combinations */
};
And use n to hold 3 digits.