Advertisement
IvanBorisovG

SignStop

Aug 11th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. t n = int.Parse(Console.ReadLine());
  2.  
  3.             Console.WriteLine("{0}{1}{0}",
  4.                 new string('.', n + 1),
  5.                 new string('_', 2 * n + 1));
  6.  
  7.             string topRowsLabel = "{0}//{1}\\\\{0}";
  8.             int midSymCount = 2 * n - 1;
  9.  
  10.             for (int i = 0; i < n; i++)
  11.             {
  12.                 string row = string.Format(topRowsLabel,
  13.                              new string('.', n - i),
  14.                              new string('_', midSymCount));
  15.  
  16.                 midSymCount += 2;
  17.  
  18.                 Console.WriteLine(row);
  19.             }
  20.  
  21.             Console.WriteLine("//{0}STOP!{0}\\\\",
  22.                 new string('_', (midSymCount - 5) / 2));
  23.  
  24.             string botRowsLabel = "{0}\\\\{1}//{0}";
  25.  
  26.             for (int i = 0; i < n; i++)
  27.             {
  28.                 string row = string.Format(botRowsLabel,
  29.                     new string('.', i),
  30.                     new string('_', midSymCount));
  31.  
  32.                 midSymCount -= 2;
  33.  
  34.                 Console.WriteLine(row);
  35.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement