Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Stop
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int counter = 0;
- //first row
- Console.WriteLine("{0}{1}{0}", new string('.',n+1),new string('_',n*2+1));
- //middle
- for (int i = 0; i < n; i++)
- {
- for (int y = n; y > i; y--)
- {
- Console.Write(".");
- }
- counter++;
- Console.Write("//{0}\\\\",new string('_',n*2+counter-2));
- counter++;
- for (int y = n; y > i; y--)
- {
- Console.Write(".");
- }
- Console.WriteLine();
- }
- //stop sign
- Console.WriteLine("//{0}STOP!{0}\\\\",new string('_',n * 2-3));
- //bottom part
- for (int i = 0; i < n; i++)
- {
- for (int y = 0; y < i; y++)
- {
- Console.Write(".");
- }
- counter--;
- Console.Write("\\\\{0}//", new string('_', n * 2 + counter ));
- counter--;
- for (int y = 0; y < i; y++)
- {
- Console.Write(".");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement