Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _5_PIN
- {
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int width = 6 * n + 10;
- int hight = 2 * n + 2;
- int spacesCount = n;
- string spaces = new string(' ', n);
- Console.WriteLine(@"/`" + new string('P', 2 * n) + spaces + "/`I" +
- spaces + "/`N" + new string(' ', 2 * n + 1) + "N");
- int leftSpacesCount = 0;
- int rightSpacesCount = 2 * n;
- for (int row = 1; row <= n - 1; row++)
- {
- Console.WriteLine("| P" + new string(' ', 2 * n - 2) + "P" +
- spaces + "| I" + spaces + "| N" + new string(' ', leftSpacesCount) +
- "N" + new string(' ', rightSpacesCount) + "N");
- leftSpacesCount++;
- rightSpacesCount--;
- }
- string pS = n % 2 == 0 ? "P" : "PP";
- Console.WriteLine("| " + new string('P', 2 * n) + spaces + "| I" + spaces +
- "| N" + new string(' ', leftSpacesCount) + "N" +
- new string(' ', rightSpacesCount) + "N");
- int spacesPP = n % 2 == 0 ? n * 3 - 1 : n * 3 - 2;
- leftSpacesCount += 1;
- rightSpacesCount -= 1;
- for (int row = 1; row <= n; row++)
- {
- Console.WriteLine("| " + pS + new string(' ', spacesPP) + "| I" + spaces +
- "| N" + new string(' ', leftSpacesCount) +
- "N" + new string(' ', rightSpacesCount) + "N");
- leftSpacesCount++;
- rightSpacesCount--;
- }
- Console.WriteLine(@"\_" + pS + new string(' ', spacesPP) + @"\_I" + spaces +
- @"\_N" + new string(' ', leftSpacesCount) +
- "N" + new string(' ', rightSpacesCount) + "N");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement