Advertisement
aggressiveviking

03.Stop

Mar 3rd, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _03.Stop
  4. {
  5.     class Stop
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int width = 4 * n + 3;
  11.            
  12.             Console.Write(new string('.', n + 1));
  13.             Console.Write(new string('_', 2 * n + 1));
  14.             Console.WriteLine(new string('.', n + 1));
  15.            
  16.             int k = 0;
  17.            
  18.             for (int i = n; i > 0; i--)
  19.             {
  20.                 Console.Write(new string('.', n - k));
  21.                 Console.Write(new string('/', 2));
  22.                 Console.Write(new string('_', (2 * n - 1) + 2 * k));
  23.                 Console.Write(new string('\\', 2));
  24.                 Console.WriteLine(new string('.', n - k));
  25.                 k++;
  26.             }
  27.            
  28.             Console.Write("//");
  29.             Console.Write(new string('_', (width - 8) / 2));
  30.             Console.Write("STOP!");
  31.             Console.Write(new string('_', (width - 8) / 2));
  32.             Console.WriteLine("\\\\");
  33.            
  34.             int m = 0;
  35.            
  36.             for (int i = 0; i < n; i++)
  37.             {
  38.                 if (m > 0)
  39.                 {
  40.                     Console.Write(new string('.', m));
  41.                 }
  42.                
  43.                 Console.Write(new string('\\', 2));
  44.                 Console.Write(new string('_', 4 * n - 1 - 2 * m));
  45.                 Console.Write("//");
  46.                
  47.                 if (m > 0)
  48.                 {
  49.                     Console.Write(new string('.', m));
  50.                 }
  51.                
  52.                 Console.WriteLine();
  53.                 m++;
  54.  
  55.             }
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement