Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // List to store Fibonacci numbers:
- List<ulong> fibonacciNumbers = new List<ulong>();
- // Generate Fibonacci numbers just summing up the
- // last previous fibonacci numbers
- Enumerable.Range(0, 200)
- .ToList()
- .ForEach(k =>
- fibonacciNumbers.Add(k <= 1 ? 1:
- fibonacciNumbers[k-2] + fibonacciNumbers[k-1]));
- // Lists the first 53 Fibonacci numbers:
- fibonacciNumbers.Take(53).Dump("Fibonacci Numbers");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement