MiroslavKisov

Christmas_Hat

Aug 3rd, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Christmas_Hat
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             char dot = '.';
  14.             char star = '*';
  15.             int n = int.Parse(Console.ReadLine());
  16.             Console.WriteLine(new string('.', n * 2 - 1) + '/' + '|' + '\\' + new string('.', n * 2 - 1));
  17.             Console.WriteLine(new string('.', n * 2 - 1) + '\\' + '|' + '/' + new string('.', n * 2 - 1));
  18.             for (int i = 0; i < 2*n; i++)
  19.             {
  20.                 Console.WriteLine(new string('.', n * 2 - 1 - i) + '*' + new string('-', i) + '*' + new string('-', i) + '*' + new string('.', n * 2 - 1 - i));
  21.             }
  22.             Console.WriteLine(new string('*', n * 4 + 1));
  23.             for (int i = 0; i < n*2; i++)
  24.             {
  25.                 Console.Write("{0}{1}",star,dot);
  26.             }
  27.             Console.Write("{0}",star);
  28.             Console.WriteLine();
  29.             Console.WriteLine(new string('*', n * 4 + 1));
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment