Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Task2
- {
- static void Main()
- {
- Int64 input0 = int.Parse(Console.ReadLine());
- Int64 input1 = int.Parse(Console.ReadLine());
- Int64 input2 = int.Parse(Console.ReadLine());
- Int64 input3 = int.Parse(Console.ReadLine());
- Int64 rows = int.Parse(Console.ReadLine());
- Int64 cols = int.Parse(Console.ReadLine());
- Int64[] output = new Int64[rows * cols];
- int check = 0;
- output[0] = input0;
- output[1] = input1;
- output[2] = input2;
- output[3] = input3;
- for (int i = 4; i < rows * cols; i++)
- {
- output[i] = output[i - 4] + output[i - 3] + output[i - 2] + output[i - 1];
- }
- while(check < rows * cols)
- {
- for (int x = 0; x < cols; x++)
- {
- Console.Write(output[check] + " ");
- check++;
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement