SHARE
TWEET

ExamC# 29.12.2012 Task2

g-stoyanov Dec 29th, 2012 36 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class Task2
  4. {
  5.     static void Main()
  6.     {
  7.         Int64 input0 = int.Parse(Console.ReadLine());
  8.         Int64 input1 = int.Parse(Console.ReadLine());
  9.         Int64 input2 = int.Parse(Console.ReadLine());
  10.         Int64 input3 = int.Parse(Console.ReadLine());
  11.         Int64 rows = int.Parse(Console.ReadLine());
  12.         Int64 cols = int.Parse(Console.ReadLine());
  13.         Int64[] output = new Int64[rows * cols];
  14.         int check = 0;
  15.         output[0] = input0;
  16.         output[1] = input1;
  17.         output[2] = input2;
  18.         output[3] = input3;
  19.         for (int i = 4; i < rows * cols; i++)
  20.         {
  21.             output[i] = output[i - 4] + output[i - 3] + output[i - 2] + output[i - 1];
  22.         }
  23.         while(check < rows * cols)
  24.         {
  25.             for (int x = 0; x < cols; x++)
  26.             {
  27.                 Console.Write(output[check] + " ");
  28.                 check++;
  29.             }
  30.             Console.WriteLine();
  31.         }
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top