Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace StopSign
- {
- class Program
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int topDots = (n + 1);
- int topDashes = (n * 2 - 1);
- int topDashesIncrease = (topDashes - 2);
- int botDotsLeft = -1;
- int botDotsRight = -1;
- int botPartDashes = (n * 4 - 1);
- int botPartDashesDecrease = (botPartDashes + 2);
- string topRow = new String('.', topDots) + new String('_', (topDashes + 2)) + new String('.', topDots);
- string middleSTOP = "//" + new String('_', (n * 2 - 3)) + "STOP!" + new String('_', (n * 2 - 3)) + "\\\\";
- //top part of the STOP sign
- Console.WriteLine(topRow);
- for (int currentRow = 0; currentRow < n; currentRow++)
- {
- Console.Write(new String('.', (n - currentRow)));
- Console.Write("//");
- Console.Write(new String('_', (topDashesIncrease += 2)));
- Console.Write("\\\\");
- Console.Write(new String('.', (n - currentRow)));
- Console.WriteLine();
- }
- Console.WriteLine(middleSTOP);
- //bot part of the STOP sign
- for (int currentRow = n; currentRow > 0; currentRow--)
- {
- Console.Write(new String('.', botDotsLeft += 1));
- Console.Write("\\\\");
- Console.Write(new String('_', botPartDashesDecrease -= 2));
- Console.Write("//");
- Console.Write(new String('.', botDotsRight += 1));
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment