Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleInputOutput
- {
- public static class Fibonachi
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- ulong first = 0;
- ulong second = 1;
- Console.WriteLine(first);
- Console.WriteLine(second);
- ulong third = ulong.MinValue;
- for (int i = 2; i < n; i++)
- {
- third = first + second;
- Console.WriteLine(third);
- first = second;
- second = third;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement