Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace SandBox
- {
- using System;
- public class EntryPoint
- {
- public static void Main()
- {
- int numberOfDesiredElementsFromSequence = int.Parse(Console.ReadLine());
- long f0Temp = 1L;
- long f1Temp = 1L;
- Console.Write($"{f0Temp} {f1Temp} ");
- for (int i = 2; i < numberOfDesiredElementsFromSequence; i++)
- {
- long tempNumber = f1Temp;
- f1Temp = f1Temp + f0Temp;
- f0Temp = tempNumber;
- Console.Write($"{f1Temp} ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement