KrasimiraGeorgieva

ChristmasHat

Mar 15th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         var rowLenght = 4 * n + 1;
  8.  
  9.         Console.WriteLine("{0}/|\\{0}", new string('.', (rowLenght - 3) / 2));
  10.         Console.WriteLine("{0}\\|/{0}", new string('.', (rowLenght - 3) / 2));
  11.  
  12.         for (int i = 0; i <= n * 2 - 1; i++)
  13.         {
  14.             Console.WriteLine("{0}*{1}*{1}*{0}", new string('.', (rowLenght - 3 - 2 * i) / 2), new string('-', i));
  15.         }
  16.         Console.WriteLine(new string('*', 4 * n + 1));
  17.         for (int i = 1; i <= 4 * n + 1; i++)
  18.         {
  19.             if (i % 2 == 0)
  20.                 Console.Write(".");
  21.             else
  22.                 Console.Write("*");
  23.         }
  24.         Console.WriteLine();
  25.         Console.WriteLine(new string('*', 4 * n + 1));
  26.     }
  27. }
Add Comment
Please, Sign In to add comment