Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
232
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. internal class Program
  3.     {
  4.         public static void Main(string[] args)
  5.         {
  6.             var n = int.Parse(Console.ReadLine());
  7.  
  8.             Console.WriteLine("{0}/|\\{0}", new string('.', 2 * n - 1));
  9.             Console.WriteLine("{0}\\|/{0}", new string('.', 2 * n - 1));
  10.             for (int i = 0; i < 2 * n; i++)
  11.             {
  12.                 Console.WriteLine("{0}*{1}*{1}*{0}",
  13.                   new string('.', (4 * n - 2 - 2 * i) / 2), new string('-', i));
  14.             }
  15.             Console.WriteLine("{0}", new string('*', 4 * n + 1));
  16.  
  17.             for (int i = 0; i < 4*n+1; i++)
  18.             {
  19.                 Console.Write(i % 2 == 0 ? '*' : '.');
  20.             }
  21.             Console.WriteLine();
  22.  
  23.             Console.WriteLine("{0}", new string('*', 4 * n + 1));
  24.         }
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement