I'm writing a Fibonacci series generator and I'm not sure which datatype should I use for it. This is what I'm doing:
Generate the first 1000 numbers in a Fibonacci series and store it in a collection.
Shuffle the above series (i.e juggle the elements)and store it in a new collection.
Create a new collection by transforming the above 2 collections by the following rule- every element in the new collection will be an average of the respective elements in the first 2 collections, residing in the same index. i.e newcollection[0]= (original[0]+shuffle[0])/2.
I have decided that my original collection and the shuffled collection should be an IEnumerable<long>
. The averaged out collection should be IEnumerable<double>
, do you think this is correct? Should I be using IEnumerable<decimal>
for the averaged out collection?
Note:Eventually all the collections are flushed to the console.
Thanks, -Mike