View difference between Paste ID: 5w4caRd7 and bNWP7RnQ
SHOW: | | - or go back to the newest paste.
1
using System;
2
using System.Numerics;
3
4
namespace ConsoleInputOutput
5
{
6
    public static class Fibonachi
7
    {
8
        public static void Main()
9
        {
10-
            ulong first = 0;
10+
11-
            ulong second = 1;
11+
	    if(n==1) Console.WriteLine(0);
12
            else
13
            {
14-
            ulong third = ulong.MinValue;
14+
            BigInteger first = 0;
15
            BigInteger second = 1;
16
            Console.WriteLine(first);
17
            Console.WriteLine(second);
18
            BigInteger third = 0;
19
            for (int i = 2; i < n; i++)
20
            {
21
                third = first + second;
22
                Console.Write(third + " ");
23
                first = second;
24
                second = third;
25
            }
26
            }
27
        }
28
    }
29
}