SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | ||
| 3 | namespace ConsoleInputOutput | |
| 4 | {
| |
| 5 | public static class Fibonachi | |
| 6 | {
| |
| 7 | public static void Main() | |
| 8 | {
| |
| 9 | int n = int.Parse(Console.ReadLine()); | |
| 10 | ulong first = 0; | |
| 11 | ulong second = 1; | |
| 12 | Console.WriteLine(first); | |
| 13 | Console.WriteLine(second); | |
| 14 | ulong third = ulong.MinValue; | |
| 15 | for (int i = 2; i < n; i++) | |
| 16 | {
| |
| 17 | third = first + second; | |
| 18 | - | Console.WriteLine(third); |
| 18 | + | Console.Write(third + " "); |
| 19 | first = second; | |
| 20 | second = third; | |
| 21 | } | |
| 22 | } | |
| 23 | } | |
| 24 | } |