Advertisement
Ziomnexpl

jedynki po przekątnych C#

Nov 28th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _555
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             string[,] tablica = new string[63,271];
  10.  
  11.             for (int i = 0; i < 63; i++)
  12.             {
  13.                 for (int j = 0; j < 271; j++)
  14.                 {
  15.                     if (i * 4 == j)
  16.                     {
  17.                         tablica[i, j] = "1";
  18.                     }
  19.                     else
  20.                     {
  21.                         tablica[i, j] = " ";
  22.                     }
  23.                     if (i * 4 + j == 260)
  24.                     {
  25.                         tablica[i, j] = "1";
  26.                     }
  27.                 }
  28.             }
  29.             for (int i = 0; i < 63; i++)
  30.             {
  31.                 for (int j = 0; j < 271; j++)
  32.                 {
  33.                     Console.Write(tablica[i, j]);
  34.                 }
  35.                 Console.WriteLine();
  36.             }
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement