Advertisement
Guest User

Untitled

a guest
May 1st, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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 StopSign
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             int n = int.Parse(Console.ReadLine());
  15.  
  16.             Console.WriteLine("{0}{1}{0}", new string('.', n+1), new string('_', 2*n+1));
  17.  
  18.             for (int i = 0; i < n; i++)
  19.             {
  20.                 Console.WriteLine("{0}{1}{2}{3}{0}", new string('.', n-i), "//", new string('_',(2*i) + n*2-1), "\\\\");
  21.             }
  22.             // total width = 4*n + 3
  23.             // underscore num = ((4*n+3)-9)/2
  24.             Console.WriteLine("{0}{1}{2}{1}{3}", "//", new string('_',n*2-3 ), "STOP!", "\\\\");
  25.  
  26.             for (int i = 0; i < n; i++)
  27.             {
  28.                 Console.WriteLine("{0}{1}{2}{3}{0}", new string('.', i), "\\\\", new string('_', 4*n-1-2*i), "//");
  29.             }
  30.  
  31.         }
  32.  
  33.  
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement