Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int firstNum = -1;
- int secondNum = 1;
- int fibNumber;
- for (int count = 0; count < n; count++)
- {
- fibNumber = firstNum + secondNum;
- Console.Write("{0} ", fibNumber);
- firstNum = secondNum;
- secondNum = fibNumber;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement