deleriumbg

PIN

Apr 16th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.46 KB | None | 0 0
  1. using System;
  2.  
  3. namespace PIN
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int width = 6 * n + 10;
  11.             int height = 2 * n + 2;
  12.  
  13.             Console.WriteLine($"/`{new string('P', 2 * n)}{new string(' ', n)}/`I{new string(' ', n)}/`N{new string(' ', 2 * n + 1)}N");
  14.             for (int i = 0; i < height - 1; i++)
  15.             {
  16.                 if (i < n - 1)
  17.                 {
  18.                     Console.WriteLine($"| P{new string(' ', 2 * n - 2)}P{new string(' ', n)}| I{new string(' ', n)}| N{new string(' ', i)}N{new string(' ', 2 * n - i)}N");
  19.                 }
  20.                 else if (i == n - 1)
  21.                 {
  22.                     Console.WriteLine($"| {new string('P', 2 * n)}{new string(' ', n)}| I{new string(' ', n)}| N{new string(' ', i)}N{new string(' ', 2 * n - i)}N");
  23.                 }
  24.                 else if (i == height - 2)
  25.                 {
  26.                     Console.WriteLine($"\\_{new string('P', n / 2)}{new string(' ', 2 * n + (n + 1 )/ 2)}\\_I{new string(' ', n)}\\_N{new string(' ', i)}N{new string(' ', 2 * n - i)}N");
  27.                 }
  28.                 else
  29.                 {
  30.                     Console.WriteLine($"| {new string('P', n / 2)}{new string(' ', 2 * n + (n + 1) / 2)}| I{new string(' ', n)}| N{new string(' ', i)}N{new string(' ', 2 * n - i)}N");
  31.                 }
  32.             }
  33.            
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment