Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class Program
- {
- static void Main()
- {
- int stopper = 1;
- BigInteger firstn = BigInteger.Parse(Console.ReadLine());
- BigInteger secondn = BigInteger.Parse(Console.ReadLine());
- BigInteger thirdn = BigInteger.Parse(Console.ReadLine());
- BigInteger T = firstn;
- int linesn = int.Parse(Console.ReadLine());
- Console.WriteLine(firstn);
- Console.WriteLine(secondn + " " + thirdn);
- for (int i = 2; i < linesn; i++)
- {
- for (int j = 2; j <= i + 2; j++)
- {
- T = firstn + secondn + thirdn;
- Console.Write(T + " ");
- firstn = secondn;
- secondn = thirdn;
- thirdn = T;
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment