Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Numerics;
- namespace _10.Fibonacci
- {
- class Fibonacci
- {
- static void Main()
- {
- Console.WriteLine("How many Fibonacci members do you want? ");
- BigInteger Members = BigInteger.Parse(Console.ReadLine());
- BigInteger a = -1;
- BigInteger b = 1;
- BigInteger c = 0;
- for (BigInteger i = 0; i < Members; i++)
- {
- c = a;
- a = b;
- b = a + c;
- Console.Write(b + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement